Joinutility seperatorLogin utility separator Infobright.com
   
 
How do I increase query performance?
Posted: 29 August 2008 12:06 PM   Ignore ]  
Jr. Member
RankRank
Total Posts:  85
Joined  2008-08-18

This is a common question that we’ve encountered in the past during our PoC process.

Question:

How can I increase the performance of my queries?

Answer :

Add a where clause(s) constraining by date (the date of the physical load sequence).

For example, to improve performance of:
 

SELECT Col ACol B from Table where Col C x

Try the following series of queries ...
 

SELECT Col ACol B from Table where Col C and Date Column 

between 2001-01-01 and 2001-12-31;
 

SELECT Col ACol B from Table where Col C and Date Column
between 2002
-01-01 and 2002-12-31

  etc.
 

SELECT Col ACol B from Table where Col C and Date Column
between 2008
-01-01 and 2008-12-31

 

IMPORTANT:  Be sure that the logical set of queries includes
the full range of dates contained in the Table being queried.

Signature 
Profile
 
Posted: 03 November 2008 06:51 PM   Ignore ]   [ # 1 ]  
Sr. Member
Avatar
RankRankRankRank
Total Posts:  505
Joined  2008-08-18

Note date arguments must be enclosed in quotes, like this: ‘2001-01-01’

Geoffrey

Signature 
Profile
 
   
 
 
     Moving from MyISAM to ICE ››