> Index the table to hell and back

>>Indexing too many fields, or the wrong combinations, can actualy hurt
>>performance.
>>It's best to put a few benchmarks in place, and add a few indices at a
time.

True.....indexes improve speed of selects but slow down inserts,updates and
deletes as the whole index needs to be rebuilt every time data is changed.

> Never use SELECT *

>>Unless in your database 'select *' is quicker than 'select
>>field,wibble,rar'.

As far as I'm aware SELECT * is quicker than selecting all fields in your
table but if you don't want all the fields then you should be specific as
this will be quicker.  However it is still good practice to not use SELECT *
as you may want all of the fields at anyone given time but in 6months time
another developer may have added columns to the table for other purposes
that you don't need in your select statement


------------------------------------------------------------------ 
Andrew Ewings
Project Manager
Thoughtbubble Ltd 
http://www.thoughtbubble.net 
------------------------------------------------------------------ 
United Kingdom 
http://www.thoughtbubble.co.uk/ 
Tel: +44 (0) 20 7387 8890 
------------------------------------------------------------------ 
New Zealand 
http://www.thoughtbubble.co.nz/ 
Tel: +64 (0) 9 488 9131 
------------------------------------------------------------------ 
The information in this email and in any attachments is confidential and
intended solely for the attention and use of the named addressee(s). Any
views or opinions presented are solely those of the author and do not
necessarily represent those of Thoughtbubble. This information may be
subject to legal, professional or other privilege and further distribution
of it is strictly prohibited without our authority. If you are not the
intended recipient, you are not authorised to disclose, copy, distribute, or
retain this message. Please notify us on +44 (0)207 387 8890.



-----Original Message-----
From: Thomas Chiverton [mailto:[EMAIL PROTECTED]]
Sent: 25 July 2001 13:06
To: CF-Talk
Subject: RE: SQL Query


> Index the table to hell and back

Indexing too many fields, or the wrong combinations, can actualy hurt
performance.
It's best to put a few benchmarks in place, and add a few indices at a time.

> Never use SELECT *

Unless in your database 'select *' is quicker than 'select
field,wibble,rar'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to