dbTalk Databases Forums  

Where condition order in SQL query from cube

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Where condition order in SQL query from cube in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
OfraA
 
Posts: n/a

Default Where condition order in SQL query from cube - 05-22-2006 , 01:15 AM






Hi,
I have two similar cubes. One cube query run very fast on the Oracle
DB, and the other runs very slow. The only difference is the order of
the Where conditions.
The Oracle DBA told me it makes the difference.
How can I influence the order of the Where condition?

I'm working with OLAP 2000 SP4

Thanks in advance
Ofra


Reply With Quote
  #2  
Old   
Jeje
 
Posts: n/a

Default Re: Where condition order in SQL query from cube - 05-22-2006 , 09:26 AM






I think you talk about the process step of the cube?
Oracle is sensible to the where clause order, but you can't specify it in
your cube.

you can optimize your cube to remove any relationships during the process
step.
but be carefull to take a backup before, in case of bad data quality.
you have to insure that your dimension tables will contains all the keys
used in the fact table.
in this case AS2000 execute a "simple" select col1, col2 col3... from
facttable without join to other tables. this will remove your need to order
the where clause.

if after you have optimized your cube the joins still here you have 2
choices:
1. review your database and dimension / cube design to have a good schema
2. create a view in your oracle database which return all the required
columns and use this view instead-of the current table in the cube. in this
case you'll control the order of the where clause.

"OfraA" <ofraa (AT) clal-ins (DOT) co.il> wrote

Quote:
Hi,
I have two similar cubes. One cube query run very fast on the Oracle
DB, and the other runs very slow. The only difference is the order of
the Where conditions.
The Oracle DBA told me it makes the difference.
How can I influence the order of the Where condition?

I'm working with OLAP 2000 SP4

Thanks in advance
Ofra




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.