Query Optimisation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dear Friends,

I received an email from a work colleague advising on how to optimise
queries (see excerpt below). Is this correct?

As a generic rule we always start our queries with the 'largest' data source
on the left hand side, and work to the right - this ensures the minimum
amount of reads from the database. To tighten this down we should say - the
largest datasource with a criteria against it.

Thanks again...

Kagsy
 
This is really kind of a tricky area. It has to do more with the largest
primary key in combination with the largest record. Most of the programming
I do is in the Macro Assembler area and we somtimes take some of what is
mentioned into consideration . Each field kind of resembles a one field file
that keeps the address of the calling primary key with it. If you send up
the queries with the largest Primary Keys first, largest records based on the
number of fields, largest field first and smallest field last, Memo, Text,
Double, Large Integer, Single, Integer and then byte fields then this would
be almost a 100 percent correct statement. However 3 position Text fields
should be between Single and Integer. I would not kill yourself on this as a
way to go.
 
Tony,

Thanks for your comments. I understand queries are an inexact science that
takes time to get a feel for. I was wondering if there have been any
interseting articles written on the internet on this subject?

Thanks again

Kagsy
 
Back
Top