BusinessObjects Board

JOIN_BY_SQL Universe Parameter

I have added JOIN_BY_SQL to the universe parameters. When I create a report and look at the SQL I still see the Synchronization folder with two Select statements in it. Shouldn’t this be one statement now that JOIN_BY_SQL is being used?


abercrombieande (BOB member since 2011-09-29)

No, only if the SQL statements would have been JOINed (instead of synchronized) will one SQL statement be created. Multiple SQL statements will be “merged” into one SQL statement by the universe parameter “JOIN_BY_SQL” if all used dimension and detail objects are the same across all involved universe contexts.


Andreas :de: (BOB member since 2002-06-20)

Hmm. All of the dimensions are conformed between the two contexts. The only difference is the measures being different between contexts.


abercrombieande (BOB member since 2011-09-29)

Are the measures properly defined, meaning using a SQL aggregate function?

Can you post the two SQL codes?


Andreas :de: (BOB member since 2002-06-20)

They are both defined as measures that can be aggregated by sum. Does it matter if they are derived tables? I removed the derived logic from the SQL below so its easier to read.

SELECT
MP.MP,
CLAIMS.PUBNBR,
BLLTRN.PAY_AMT
FROM
MP,
CLAIMS,
BLLTRN
WHERE
( MP.MP_LC=BLLTRN.MP_LC )
AND ( BLLTRN.CLMIDN=CLAIMS.CLMIDN )

SELECT
MP.MP,
CLAIMS.PUBNBR,
LOSTRN.PAY_AMT
FROM
MP,
CLAIMS,
LOSTRN
WHERE
( MP.MP_LC=LOSTRN.MP_LC )
AND ( LOSTRN.CLMIDN=CLAIMS.CLMIDN )


abercrombieande (BOB member since 2011-09-29)

Your measures do not have aggregate functions on them. That’s the problem. They need to be defined in the universe with an aggregate function in the select. For example:

SUM(BLLTRN.PAY_AMT)


MichaelWelter :vatican_city: (BOB member since 2002-08-08)

Wow. As you can tell I am new to universe designer. Now the folder name changed to JOIN. It still lists two queries but I am guessing that is ok. For all aggregations should I be wrapping the measures with sum()? The alternative is that the aggregation is done in Business Objects vs on the server?

Thanks so much


abercrombieande (BOB member since 2011-09-29)

Every measure object should have an aggregate function, such as SUM, COUNT, AVERAGE, etc. Let the database do the aggregating, and return the aggregated results. You’ll get much better performance that way.


MichaelWelter :vatican_city: (BOB member since 2002-08-08)

Please, see my post here. And do get an experienced universe designer for a couple of days to guide you with tips & tricks. Money, well spent :yesnod:


Andreas :de: (BOB member since 2002-06-20)

I had the same issue available in this post,But i noted the difference in my universe that when i set the JOIN -BY_SQL in Parameters tab to be made as YES or NO i dont find the diff in the display of my sql

In both the method my measure object(with aggreagated) shows in Join folders…

Is Join-By-SQL makes the imapct on the display of sql in folders or in a single statement…if my assumption is wrong…wat is the use of Join By SQL :roll_eyes:


saranya R :india: (BOB member since 2011-09-20)

It will make no difference to the display of, or to the actual SQL statements.

Setting this means the joining of the SQL statements will be done by the database instead of the reporting tool. This should ensure better performance.


Mak 1 :uk: (BOB member since 2005-01-06)

Merging of cubes would have been a better terminology … me thinks.


Andreas :de: (BOB member since 2002-06-20)

Agreed, I probably did not explain this very well :).


Mak 1 :uk: (BOB member since 2005-01-06)

Thanks Experts…This forum is wonderful to clarify all my issues i face…Thanks once again for the prompt response in queried …Thank u once again experts. :nopity:


saranya R :india: (BOB member since 2011-09-20)