Unnecessary joins coming up in BI server query

Hi,
I have the following logical model consisting of one fact and one dimension(sort of degenerate dimension)
1) Fact - contains two LTS based on the same physical table - W_FACT_F. Both the LTS also have inner joins with few other dimensions
2) Dim - contains attributes from four aliases based on W_FACT_F and other attributes from five aliases based on W_DIM_D. Here, also the fact aliases contain a number of inner joins with other dimensions.
Now, if I run a simple report with one column from the logical fact and another column(which is based on the fact table) from the logical dimension, I expect the query to go to go only one fact alias. However, it traverses through two aliases and all the inner joins with dimensions also come into the picture.
It's not my design and it looks very bad on paper but if anyone can give me any pointers, it would be great.
Thanks

If you have separate LTSs , they fire only when columns from both are used. But if you have 1 LTS with multiple sources as inner join within the LTS, then all fire all the time.
So, you should use a separate LTS.
or
You can keep the inner join LTS and add another LTS (from one more alias) . Then add columns with different names which should be used when you intend to avoid unnecessary joins.

Similar Messages

  • Joined my Macbook to OSX Server and Entourage & Mail stopped coming in

    I have OSX server (up to date) running but not configured for email at this time.
    I joined my MB to the server and now Entourage and Mail refuse to retrieve or send email. I believe the error I'm getting is that the server is not found.
    My wife has the new MBP 13.3 and is on the server with no email problems.

    Hi
    Are you using the same DNS Server as your wife? If you're not and you've configured to use the Mac Server to resolve DNS (internally) then this could explain why you have the problem? If you've joined your client to the Mac Server to take advantage of the more Advanced Services available such as LDAP, Roaming Profiles, iCal etc then you would/should be using it to resolve DNS.
    In which trying case to resolve an external domain that has nothing to do with the internal one could well result in mail services not working.
    You could add the external Mail Server's external IP Addresses and Host Names to your internal DNS Service's zone files. Or add an external DNS Server IP Address to your DNS Server's field in the Advanced Section of the Network Preferences Pane for the affected client.
    Tony

  • Converting SQL Server Query to Oracle

    Hello TechFriends,
    Can any one of u please tell me equivalent of following SQL Server Query?
    The same query runs in Oracle but givesa same reocrds in different order!! I want such an equivalent oracle query that gives records in same order as Sql Server does.
    select
    ProfValue_ProfScaleFK ProfScale,
    ProfValue_Value ProfValue,
    isnull(ProfValueDesc.name, ProfValue_name) ProfName
    from
    ProfValueDesc inner join TBL_LMS_Lang
    on lang_fk = lang_pk and langid = 'en'
    right outer join ProfValue
    on ProfValue_ProfScaleFK = ProfScale_fk and ProfValue_Value = ProfValue_FK ;
    Regards & TIA.
    Anand.

    If you want a specific ordering why don't you add an ORDER BY clause?
    Donal

  • From SharePoint Content Database, Using SQL-Server Query how to fetch the 'Document GUID' based on 'Content Type'

    I want to get all the documents based on content type using SQL Server Query. I know that, querying the content database without using API is not advisable, but still i want to perform this action through SQL Server Query. Can someone assist ?

    You're right, it's not advisable, may result in corruption of your databases and might impact performance and stability. But assuming you're happy to do that then it is possible.
    Before you go down that route, have you considered using something more safe like PowerShell? I've seen a script exactly like the one you describe and it would take far less time to do it through PS than it would through SQL.

  • Sql server query

    sql server query to rearrange the rows after inserting the rows in a table

    You want to re-arrange the data physically?!!! Why? I believe its something impossible other than having a clustered key(there could be some strange ways of doing it) and a thing that should not worry about. Always there is a ORDER BY CLAUSE to order your
    data while retrieving 
    Satheesh
    My Blog |
    How to ask questions in technical forum

  • Maximum number of tables that can be outer joined with one table in a query

    Hi All,
    Iam new to sql, so can you please let me know What is the maximum number of tables that can be outer joined with one table in a query?
    Thanks,
    Srini

    srinu2 wrote:
    Iam new to sql, so can you please let me know What is the maximum number of tables that can be outer joined with one table in a query?
    There is no limit to the number of tables you can outer join as long as you join them correctly.
    SQL> with a as
      2      (
      3      select 1 id, 2 b_key, 3 c_key from dual union all
      4      select 2 id, 1 b_key, 4 c_key from dual union all
      5      select 3 id, 3 b_key, 1 c_key from dual union all
      6      select 4 id, 4 b_key, 2 c_key from dual
      7      ),
      8      b as
      9      (
    10      select 1 id, 1 c_key2 from dual union all
    11      select 2 id, 5 c_key2 from dual union all
    12      select 3 id, 3 c_key2 from dual union all
    13      select 4 id, 2 c_key2 from dual
    14      ),
    15      c as
    16      (
    17      select 1 key1, 1 key2, '1-1' dta from dual union all
    18      select 1 key1, 2 key2, '1-2' dta from dual union all
    19      select 1 key1, 3 key2, '1-3' dta from dual union all
    20      select 1 key1, 4 key2, '1-4' dta from dual union all
    21      select 2 key1, 1 key2, '2-1' dta from dual union all
    22      select 2 key1, 2 key2, '2-2' dta from dual union all
    23      select 2 key1, 3 key2, '2-3' dta from dual union all
    24      select 2 key1, 4 key2, '2-4' dta from dual union all
    25      select 3 key1, 1 key2, '3-1' dta from dual union all
    26      select 3 key1, 2 key2, '3-2' dta from dual union all
    27      select 3 key1, 3 key2, '3-3' dta from dual union all
    28      select 3 key1, 4 key2, '3-4' dta from dual union all
    29      select 4 key1, 1 key2, '4-1' dta from dual union all
    30      select 4 key1, 2 key2, '4-2' dta from dual union all
    31      select 4 key1, 3 key2, '4-3' dta from dual union all
    32      select 4 key1, 4 key2, '4-4' dta from dual
    33      )
    34  select d.a_id, d.b_id, c.key1 as c_key1, c.key2 as c_key3, c.dta
    35  from
    36      c,
    37      (
    38      select
    39          a.id as a_id, b.id as b_id, a.c_key, b.c_key2
    40      from a, b
    41      where a.b_key = b.id
    42      ) d
    43  where d.c_key = c.key1 (+)
    44  and   d.c_key2 = c.key2 (+);
          A_ID       B_ID     C_KEY1     C_KEY3 DTA
             3          3          1          3 1-3
             4          4          2          2 2-2
             2          1          4          1 4-1
             1          2
    SQL>

  • OBIEE 11.1.1.7-Ago Function Error-[nQSError: 46008] Internal error: File server\Query\Optimizer\SmartScheduler\PhysicalRequestGenerator\Src\SQOSPMarkMultiTargetSupport.cpp

    Hi All,
    I was performing the steps mentioned in Oracle Tutorial"http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bi11115/biadmin11g_02/biadmin11g.htm#t10"-BI RPD creation.
    After Using the AGO function data in the Time series metric(Month Ago Revenue) was null always. I updated the DB features in RPD physical layers by selecting support for time series functions.
    After that report started to fail with below error. Please let me know if its a bug and any option to fix it.
    Thanks,
    Sreekanth
    Error
    View Display Error
    Odbc driver returned an error (SQLExecDirectW). 
      Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P 
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 46008] Internal error: File server\Query\Optimizer\SmartScheduler\PhysicalRequestGenerator\Src\SQOSPMarkMultiTargetSupport.cpp, line 1680. (HY000) 
    SQL Issued: SELECT 0 s_0, "Sample Sales"."Time"."Year-L1" s_1, "Sample Sales"."Revenue"."Ago-Year Revenue" s_2, "Sample Sales"."Revenue"."Revenue" s_3 FROM "Sample Sales" FETCH FIRST 65001 ROWS ONLY
      Refresh

    I know that there is no relation between "SampleApp Lite"."D3 Orders (Facts Attributes)"."Order Date", "SampleApp Lite"."D0 Time"."Calendar Date", it's also the same thing in my own RPD.
    But as it's working with the 11.1.1.6.2 BP1 version I don't understand why it's not working with 11.1.1.6.9.
    Implicit fact column is not set on my repository, but I don't have any request with only dimensional column, so if my understanding is correct I don't need to use it. Also, the problem appears during the check of the repository not in answers.
    thanks anyway

  • Can we join two totals tables in ABAP Query

    Hey Gurus!
    Can we join two totals tables in ABAP query.
    I am tyring to join FAGFLEXT with internal orders totals table.
    Thanks
    S

    Hi,
    Report painter majorily operates around characteristics and key figures.
    ABAP query comes even more handy.  The advantage is -
    1. You can link many tables
    2. Create selection screen as you like to have
    3. User friendly report creation
    4.  Logic can also be coded.
    5. Authorization can be set
    I have written a article in SDN, which gives you an idea as to how to go about using ABAP query.  Have a look on this - [Article - Practical Usage of ABAP Query|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20f6b256-23be-2b10-8b93-cad83a617634]
    Regards,
    Sridevi

  • Official documents on escaping characters in SQL Server query statements

    Hi,
    Are there any official documents on how to escaping special characters in SQL Server query statements? I find a lot of online resources discussing about this, but there are no definitive conclusions on:
    Which characters should be escaped? (Some only said single-quote needs to be escaped, double-quote does not need. While others said both need to be escaped)
    How to escape characters? (Some said using two single-quote to escape a single-quote. Others said using a backslash, etc.)
    So I just wonder if there is an official document from Microsoft regarding this?
    Thanks
    Alan

    Depends on where you're using them
    If its string values then single quotes(') should be escaped by putting one more single quote before it.
    If its LIKE operator you can use ESCAPE keyword or use [] to escapre special characters 
    see
    http://visakhm.blogspot.in/2013/01/wildcard-character-based-pattern-search.html
    If inside SSIS expression you can escape characters like \ " etc by adding an extra \ before the characters
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Linked server query using Dynamic SQL

    I have a Linked server query that takes forever to run. WHen I hardcode the acct# it runs fast. However I want these acct numbers int he where clause to be generated dynamically. For eg: below is what I need:
    --Get the 11 Loans from this Table A From the FIRST QUERY
    --- Plug those loans numbers in the second query  In the WHERE Clause eg should looks like  where  ACCT in (1,2,3,5)
    DECLARE
    @sSQL varChar(MAX)
    SET @sSQL
    =
    ' SELECT
    [Loan] FROM TableA D
    EXECUTE(@sSQL)
    --2ND QUERY 
    DECLARE
    @sSQL1 varChar(MAX)
    SET @sSQL1
    ='
    SELECT Field1, 
    Field2,
    Field3,
    Field4,
    Field5
       FROM LinkedServer.Dbaname.dbo.TableB a
    where ACCT in ''('''
    +(@sSQL)
    +
    ''')'''--- This needs to look like  where  ACCT in (1,2,3,5)
    select
    @sSQL1

    Ok, so use this.. instead of your first statement.
    DECLARE @sSQL NvarChar(MAX), @output NVARCHAR(100), @ParmDefinition nvarchar(500);
    SET @ParmDefinition = N'@sqlout NVARCHAR(100) OUTPUT'
    SET @sSQL = N'SELECT DISTINCT @sqlout = STUFF((SELECT '',''+CAST(S2.loan AS VARCHAR(100))
    FROM tableA S2
    FOR XML PATH('''')), 1, 1, '''')
    FROM tableA S1'
    EXECUTE sp_executesql @sSQL, @parmdefinition, @sqlout = @output OUTPUT
    and use @output instead of @sSQL in the second statement.
    You can read about STUFF command @
    http://sqlsaga.com/sql-server/how-to-concatenate-rows-into-one-row-using-stuff/.
    Good Luck :)
    Visit www.sqlsaga.com for more t-sql code snippets or BI related how to's.

  • Can we perform Join operation using SQLCall with Datatabae Query

    Hi,
    I am working on Toplink SQLCall query. I am performing join operation but, it is giving error.
    so please, any can tell me . we can perform join operation using SQLCall with Database Query
    Thanking You.

    You can use joining with SQLCall queries in TopLink, provided your SQL returns all of the required fields.
    What is the query you are executing and what error are you getting?

  • Join an ADFS 2.0 server to ADFS 3.0-farm

    Hi there,
    we startet using ADFS with an on premises ADFS 2.0-server running win2012. Now we migrated to an azure-server that runs win2012 r2. I deployed ADFS completely with a new farm configuration running ADFS 3.0. Now I wonder if I can join our "old"
    on premises-server to the new farm configuration. I'd like to do load balancing between those two servers.
    Is that a supported configuration or do I have to upgrade/renistall the old ADFS-server, so that it also runs ADFS 3.0?
    Thanks and regards
    Marcel

    Hi Marcel,
    It seems that this issue is more related to Azure AD. I moved this issue on Azure AD forum . Thanks for your understanding.
    Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Converting SQL Server query to access join missing operator issue

    The RIGHT JOIN without and ON clause is throwing me.  I cannot figure out where access is wanting the parenthesis in the join syntax this query:
    SELECT DISTINCT *
    FROM CANDIDATE_RECRUITERS
    INNER JOIN CANDIDATE_EVENTS 
      ON CANDIDATE_RECRUITERS.RecruiterNum = CANDIDATE_EVENTS.Recruiter
    RIGHT OUTER JOIN CANDIDATE_CUR
    INNER JOIN CANDIDATE_JOB_TITLES 
      ON CANDIDATE_CUR.JobTitle = CANDIDATE_JOB_TITLES.TitleID
    INNER JOIN CANDIDATE_COMPANY_CUR 
      ON CANDIDATE_CUR.CompanyNum = CANDIDATE_COMPANY_CUR.CompanyNum 
      ON CANDIDATE_EVENTS.CandidateNum = CANDIDATE_CUR.CandidateNUM

    Try this:
    SELECT *
    FROM (((Candidate_Recruiters
    LEFT JOIN Candidate_Events
    ON Candidate_Recruiters.RecruiterNum = Candidate_Events.Recruiter)
    RIGHT JOIN Candidate_Cur
    ON Candidate_Recruiters.CandidateNum = Candidate_Cur.CandidateNum)
    INNER JOIN Candidate_CurCompany
    ON Candidate_Cur.CompanyNum = Candidate_CurCompany.CompanyNum)
    INNER JOIN Candidate_Job_Titles
    ON Candidate_Cur.JobTitle = Candidate_Job_Titles.TitleID
    Matthias Kläy, Kläy Computing AG

  • SQL server Query to sort the Stored procedure as text

    Hi
    I have a requirement as below :
    Stored procedure in SQL server has some 1000 lines of code where the SP uses select, insert , update ,delete and Joins on direct tables and as well as temp tables , the requirement is to get all text code from sp which is used for either select/insert
    except update and delete.
    for example :
    Create PROCEDURE testproc
    AS
    Begin
    /*Statement 1*/
    select id from emptable
    /*Statement 2*/
    select address into #empAddress from empAddresstbl
    /*Statement 3*/
    update a
    set id = 0 from usertbl a 
    /*Statement 4*/
    Update u
    set access=0 from usertbl u
    inner join permissionstbl p
    on u.userid = p.userid
    /*Statement 5*/
    select name into #empname
    from empnametbl
    inner join Nametbl on
    empname.id = name.id
    END
    for the given sample sp the output of query shld be
    from emptable
    from empaddresstbl
    from empnametbl
    join nametbl
    it shld not consider the table name from update/delete and the tables used for joins in updates/delete.
    This has to be achieved using  SQL
     Thanks,

    Hi All,
    Problem is solved after adding files to microsoft access 2000 runtime. runtime missing some DLLs related to sql server 2000 to update those files follow the links below
    http://support.microsoft.com/?kbid=287484
    http://www.microsoft.com/office/orkarchive/2000ddl.htm#accsql
    Thanks,
    Brahma

  • How to join local computer to virtual server domain ?

    Hi everyone,
    I am new to Window Azure cloud computing. I found many articles and tutorials available online but I am kind of lost because I don't what I need to do to achieve my scenario.
    Scenario: I want to migrate my servers to cloud and retire all local servers such as DC and file server. At the same time, I wish to control the network traffic to limit the clients access to Internet resources. I am not sure retiring the
    all local servers is something right to do and how to do.
    What I have done:
    1. Site-to-Site VPN connection with Dell Sonicwall TZ205 to VNet. (I followed the route-based VPN in this document -> https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CB0QFjAA&url=https%3A%2F%2Fsupport.software.dell.com%2Fdownload%2Fdownloads%3Fid%3D5343958&ei=ykGhVIK6GISWuASU6oHQBw&usg=AFQjCNGGS6fsuK6IHAWyQgZi5fey4xhfKg&bvm=bv.82001339,d.c2E&cad=rja)
    2. Created a VM in the VNet. (I can ping the VM from computers connected to TZ205)
    3. Installed active directory and configured the domain forest.
    What I need to do:
    1. How to join the local computers to the virtual server domain controller with S2S and P2S VPN. (Some Internet resources mentioned I need to install Connect agent in order to do this)
    Extra questions:
    1. Is it possible to request the clients to provide account credentials before the point-to-site VPN to VNet is established ?
    2. How do I configure the TZ205 VPN router to send all the Internet traffic to the VNet instead of the ISP gateway? The computers connected to TZ205 firewall router public IP address doesn't change to the VNet gateway IP.
    Thanks for your time reading my questions. It will be helpful if you can provide me some useful links or ideas.
    Sincerely,
    Chee-Kian

    Greetings!
    I assume there is connectivity between on-prem device and DC on Azure VM.
    You can set the Internal IP of the DC as DNS on the on-prem device and trying joining it to the existing domain. Please note to use S2S VPN.
    It is not possible to provide user credentials while connecting to vNet via P2S VPN. It's a certificate based authentication (which is so by design).
    With regards to your query to send all internet traffic to vNet instead of ISP gateway. Please refer to Forced Tunneling:
    http://msdn.microsoft.com/en-us/library/azure/dn835140.aspx
    Hope this helps.
    Thank you,
    Arvind

Maybe you are looking for