Physical Query of OBIEE

Hi All,
I noticed in many queried of OBIEE to database containing the select 0 as c1. Please let me know why it is firing 0 from table if so it always return zero for particular coulmn. Can any plz let me know whats the logic behind it..
Below is the one of the query where OBIEE uses select 0 as c1
select D1.c1 as c1,
D1.c2 as c2,
D1.c3 as c3,
D1.c4 as c4
from
(select D1.c1 as c1,
D1.c2 as c2,
D1.c3 as c3,
D1.c4 as c4
from
*(select 0 as c1,*
D1.c2 as c2,
D1.c1 as c3,
D1.c3 as c4,
ROW_NUMBER() OVER (PARTITION BY D1.c2, D1.c3 ORDER BY D1.c2 ASC, D1.c3 ASC) as c5
from
(select LAST_VALUE(D1.c4) OVER (PARTITION BY D1.c3 ORDER BY NVL2(D1.c4, 1, 0) , D1.c3 NULLS FIRST, D1.c5 NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) as c1,
D1.c2 as c2,
D1.c3 as c3
from
(select T156337.MCAL_PER_NAME_YEAR as c2,
T156337.MCAL_YEAR_WID as c3,
sum(T134466.BALANCE_GLOBAL1_AMT) as c4,
T156337.ROW_WID as c5
from
W_MCAL_DAY_D T156337 /* Dim_W_MCAL_DAY_D_Fiscal_Day */ ,
W_GL_GROUP_ACCOUNT_D T102174 /* Dim_W_GL_GROUP_ACCOUNT_D */ ,
W_GL_BALANCE_A T134466 /* Fact_Agg_W_GL_BALANCE_A */
where ( T102174.ROW_WID = T134466.GROUP_ACCT_WID and T102174.GROUP_ACCOUNT_NUM = 'AR' and T134466.BALANCE_DT_WID = T156337.ROW_WID )
group by T156337.ROW_WID, T156337.MCAL_YEAR_WID, T156337.MCAL_PER_NAME_YEAR
) D1
) D1
) D1
where ( D1.c5 = 1 )
) D1
order by c1, c2

I don't see it in NQQuery log:(
Ideally, it should be because it will hit BI Server. Moreover, I can see it (report's logical SQL) in BI Server Cache.
Any other thoughts?

Similar Messages

  • Physical Query in OBIEE 10g vs OBIEE 11g

    Hi Everyone,
    We're in the middle of an OBIEE 10g to an OBIEE 11.1.1.6.4 upgrade and as part of our assembly testing we were planning on comparing the physical query generated for a report generated in obiee 10g vs the physical query for a report in obiee 11g.
    After a couple reports we noticed that the query structure in 11g is completely different than the query structure in 10g. The reports still generated the same data in 10g vs 11g. So my question is:
    1) is it worth while (or necessary) to do a physical query comparison for an obiee 10g to 11g upgrade? or is validating the front-end report data & drill down/interactions adequate?
    2) what are some general reasons why a query generates differently in obiee 10g vs 11g?

    Pl post details of OS versions, exact database versions (to 4 digits) and init.ora parameters of the 10g and 11g databases. Have statistics been gathered after the upgrade ?
    For posting tuning requests, pl see these threads
    HOW TO: Post a SQL statement tuning request - template posting
    When your query takes too long ...
    Pl see if the SQL Performance Analyzer can help - MOS Doc 562899.1 (TESTING SQL PERFORMANCE IMPACT OF AN ORACLE 9i TO ORACLE DATABASE 10g RELEASE 2 UPGRADE WITH SQL PERFORMANCE ANALYZER)
    HTH
    Srini

  • Viewing the physical query in OBIEE

    In the NQQuery.log file the physical query executed on the database is not logged. I have changed the logging level of the user to "2" in the Administration Tool. What else is needed to view the physical query?

    Hi ,
    if the caching is on your sql runs from cache and you can see 'cache hit' in your NQQuery.log file.If you turn off your caching property from nqsconfig.ini file and purge your cache files from administration tool or manually deleting from its directory then you should see the physical query.
    If your caching property is off, I dont have an idea about it.

  • Syntax error in OBIEE generated Physical query - Advance filter concept

    I encountered a syntax error when running a report with the help of advanced filter concept.
    I am getting syntax error at the physical query generated by the OBIEE for main report.
    I used a sub report with the help of advanced filter concept in main report.
    I am posting the physical query for the convenience.
    select D1.c2 as c1,
    D1.c1 as c2
    from
    (select sum(T600347.sales_usd) as c1,
    T601002.currency as c2
    from
    (Select distinct currency from pfact) T601002,
    pfact T600347
    where ( T600347.currency = T601002.currency and T600347.pdate between ( select distinct min(D1.c1) as c1* from
    (select D1.c1 as c1
    from
    (select D1.c1 as c1
    from
    *(select max(T600425.pdate) as c1*
    from
    *(select distinct pdate from pdates where pdate is not null) T600425*
    where  ( T600425.pdate < 11/22/2010 )
    *) D1*
    ) D1
    ) D1 ) and '11/25/2010')
    group by T601002.currency
    ) D1
    I executed the query against my database(sybase) in query tool. It showed error.
    I took out the column alias generated by the OBIEE ("as c1" as underlined). Then the query is working fine.
    How to disable OBIEE from generating the alias.
    Is there any way to do it.
    If obiee is generating the physical query, i am suprised to see a syntax error.
    The bold part is the query from Intermediate report
    I underlined the problematic part.
    Please help me. This is an urgent reuirement,
    Thanks in advance for the help.

    HI,
    When I execute the query on query tool ( my database is sybase)
    I am geting error at "as c1" part, as underlined in the query.
    when I remove that and execute the query, It is generating the output.
    here is the better view of query and error:
    http://img255.imageshack.us/img255/4719/25187227.jpg

  • OBIEE Issue - Physical Query not picking cascaded Conditions

    In one the OBIEE Reports, I have given a set of NOT LIKE conditions as below:
    Session Name is not LIKE (pattern match) '%AUDIT%'
    AND Session Name is not LIKE (pattern match) '%audit%'
    AND Session Name is not LIKE (pattern match) '%Audit%'
    But when we refresh the report, it filters only records which uses AUDIT keyword as part of Session Names. When I checked the session log (attached for reference), I found that though logical table query takes those three conditions, while firing against database Physical Query contains condition only for AUDIT wild card as filter. Whether there is any limitation applied on using NOT LIKE conditions or is it a bug or the way the conditions are sequenced is wrong (in OBIEE sense).

    Thanks buddy. Though this workaround will solve the issue, I am curious to know why OBIEE behaves such a way. Its peculier to see OBIEE admits all 3 conditions in logical query where the Physical query skips few of the conditions in session log itself.

  • Re: View physical query issued by Obiee 11g

    Guys,
    I want to view the physical query generated by the report in OBIEE 11g, but in the logs, i can only see these queries: (Just writing the first line to illustrate)
    SELECT
    0 s_0,
    "Marketing Contact List"."- Account Address"."Billing Abode Name" s_1,
    And this query:
    RqList distinct
    0 as c1 GB,
    Account.Billing Abode Name as c2 GB,
    Both these queries are NOT the physical ones.
    I have the appropriate log level, and even set it manually from the front end, but I'm unable to view the physical query. Please help!

    A.Budd,
    After running a report in OBIEE, click the Administration Link in the top right corner. New window appears and select "Manage Sessions". Look for the latest time executed that applies to the time you executed your report and click View Logs. Scroll almost to the bottom of the log.
    What you are looking for is the generated logic that starts with "*With*"
    WITH
    SAWITH0 AS (select sum(T443244.AGING030) as c1,
    sum(T443244.AGING6190) as c2,
    sum(case when T443244.CURRENCYCODE = 'C
    Copy the whole logic from WITH to the end of the logic (typically ends with Order By) (not the log) and paste it in your query tool. This is based on the physical layer.
    Antexity

  • Physical query issued by Obiee when cache is on is different and slow

    When the same report runs in OBIEE 10g and cache is OFF it takes less then 1min to get results. If cache is turned ON physical query issued by Obiee is totally different and it takes 2h to get results. Has anyone experienced this with having cache on that some queries are performing poorly.
    Thanks,
    Tatjana

    We are using BI Apps Order Management and Fulfillment Analytics and all tables are cached anyway. Dimensions used are not that huge up to 40K rows. What should I check when it comes to DB query? As I said is different than one generated when cache is disabled although both have the almost the explain plan.

  • What is the diff b/w logical query and physical query?

    Thanks In advance

    In OBIEE terms the logical query is how you query the BI Server, the Presentation services sends logical SQL to the BI Server, you can also write your own using JDBC , pull from BI Server using ODI etc.
    The BI Server engine takes this logical query and writes (a number of) phyiscal querie(s) to satisfy the logical request, depeninding on how your BMM and Physical layer is setup. There are a number of rules the BI Server evaluates before deciding the most appropriate Physical query to generate, rules include Physical Joins, Aggregate tales / Hierarchy levels and so on.
    Hope this helps,
    Good luck with interview :-)
    Alastair

  • Additional columns in physical query

    hi,
    OBIEE 11.1.1.6
    This is continuation from my old post for strange behavior of logical to physical query transformation.
    Floor applied during
    I got additional column during the transformation from logical SQL to physical SQL
    select Distinct 0 as c1, case when .... as c2 from ....where 0 as c1 is additional column which I am getting.
    Did anyone experienced with the same issue? any solution for to overcome this issue?
    Thanks,
    Hesh

    Based on default OOB query settings this get generate, generally with WITH clause. No point to trace it for the reasons untill this is not affecting to your results.
    I would suggest just ignore ;)
    Pls mark as correct/helpful if helps

  • Date prompt not displayed in physical query

    Hi All,
      I am using obiee 11.1.1.6.8 where i am not able to view the date prompt filter which is used in dashboards in  nqs(physical query).. But the same i can able to view in Logical query..Can any one help on this issue.
    Reagrds,
    Guru

    Check cache settings.
    prefix this in prompt
    set variable disable_cache_hit=1;
    btw: Did you get a chance to look at https://forums.oracle.com/thread/2594287

  • Physical query generation: unneeded dimension tables get joined to the fact

    Hi there!
    The setup is the following:
    There is a logical fact table which is joined to 7 logical dimensions, it has 4 table sources which correspond to different time dimension levels (all other dimensions are mapped to Detail level).
    Time dimension logical table also has 4 different table sources (for days, months, quarters, and years).
    The data source is an Oracle Database 11gR2.
    The problem is:
    No matter what the logical query is, in the physical query all 7 joins are performed, even if the resulting data is then simply discarded. This results in very bad query performance.
    I feel that it is somehow related to the level-based fragmentation (since, for instance, inclusion of time dimension columns in SELECT list (not in WHERE) seems to affect physical queries), but lack sufficient knowledge to solve this problem or put up with it.
    My questions are the following:
    1) Have you ever encountered such a situation?
    2) Can unneeded joins be eliminated?
    2.1) If yes, how?
    2.2) If not, then why are they needed?
    Thanks in advance!

    Physical level:
    D01-D06 - ordinary physical tables.
    D_DATES - all time levels from dates to years, D_MONTHS - time levels from months to years, also D_QUARTERS and D_YEARS.
    F_DAILY - fact table joined to all of the D01-D06 and to D_DATES, F_MONTHLY - joined to D01-D06 and D_MONTHS, also F_QUARTERLY and F_YEARLY. All measure columns are the same.
    Logical level:
    D01-D06 correspond to ordinary logical tables with a single table source. Logical dimensions are created.
    D_TIME is a logical time dimension with four levels (dates, months, quarters, and years) and four table sources ( D_DATES, D_MONTHS, D_QUARTERS, and D_YEARS ).
    F is a fact table with four logical table sources ( F_DAILY, F_MONTHLY, F_QUARTERLY, and F_YEARLY ) with aggregation content levels set correspondingly.
    OBIEE correctly picks physical table sources for different time levels, but generates extremely inefficient SQL (joining all dimension sources in a WITH-subquery, doing ROW_NUMBER over a result set, and then discarding half the columns, which were not needed to start with).

  • How to extract the Physical Query(database Query)

    Hi ,
    How to extract the Physical Query(database Query) from obiee which was fired in obiee
    Regards
    Ranga

    Hi Ranganath,
    Have a look the following links.
    Setting Logging level:
    http://gerardnico.com/wiki/dat/obiee/loglevel
    How to see physical query:
    http://gerardnico.com/wiki/dat/obiee/manage_session_log
    If you are new to OBIEE, spend some hours on the following blog to learn from basics to advanced level.
    http://gerardnico.com/wiki/
    http://obiee101.blogspot.com/
    http://www.rittmanmead.com/blog/
    Hope it helps you.
    Regards,
    Kalyan Chukkapalli
    http://123obi.com

  • Undisplayed Physical query SQL Server 208

    Hi,
    I am querrig an SQL Server 2008 database with OBIEE. But the physical query syntax isn't dispalayed in the nqQuery.
    I got a message seems to History unfound.
    Is there any way to get the physical query on database different from oracle like SQL server or XML...?
    Thanks

    Can you check the logging level of the user you are logging as ?
    I guess because the logging level is not defined hence no history for this user !!

  • Undisplayed Physical query SQL Server 2008

    Hi,
    I am querrig an SQL Server 2008 database with OBIEE. But the physical query syntax isn't dispalayed in the nqQuery.
    I got a message seems to History unfound.
    Is there any way to get the physical query on database different from oracle like SQL server or XML...?
    Thanks

    Can you check the logging level of the user you are logging as ?
    I guess because the logging level is not defined hence no history for this user !!

  • Between operator is taking as = and = in physical query

    Hi,
    i am implementing filter in obiee as follows,
    calendar date between 01/01/2010 and 01/01/2010
    or
    calendar date between 01/01/2009 and 01/01/2009
    when i executed the query it is showing the above logic in obiee logical query,where as in physical query it is taking as
    (T1233290."CALENDAR_DATE" >= DATE '2009-01-01' or T1233290."CALENDAR_DATE" >= DATE '2010-01-01') and (T1233290."CALENDAR_DATE" >= DATE '2009-01-01' or T1233290."CALENDAR_DATE" <= DATE '2010-01-01') and (T1233290."CALENDAR_DATE" >= DATE '2010-01-01' or T1233290."CALENDAR_DATE" <= DATE '2009-01-01') and (T1233290."CALENDAR_DATE" <= DATE '2009-01-01' or T1233290."CALENDAR_DATE" <= DATE '2010-01-01') )
    how to get the between operator in physical query.
    please help me out in this.

    Why are u using the same dates in between option ?

Maybe you are looking for

  • B&W PRESET

    Once I tried to bring in some images to LR utilizing the B&W conversion preset. Now every time I go to the library module all images on the screen automatically convert to B&W . How do I get rid of the B&W conversion?

  • Request for information on Contract Life Cycle in SRM 4.0

    Hi SRM Experts, I am implementing Contarct Process in SRM 4.0. How I can create PO (or cntract release order) with reference to contract (created with process contracts). Could you please provide SRM 4.0 contract Life Cycle. Thanks, Sudarsan

  • Disable the copy and paste

    Hi, can any one tell how to disable the copy and paste functionality of the text items in the forms 11g. Advance Thanks.

  • What exactly did I Migrate??

    Hi, I wanted to copy only a few things from my old Mac to my new MacBookPro. So I started Migration Assistant, thinking I could select individual files and folders. Mainly I wanted to copy my iTunes Library, plus a few random other folders in my user

  • Reader could not contact the server to complete the request........how to fix this?

    New to Adobe..........trying to convert a .doc file to .pdf............but all I get is, "Reader could not contact the server to complete the request." Ideas?