> If I understand your question correctly, yes, you'll generally want your
> foreign keys to be indexed. Any fields commonly used for filters or joins
> should be indexed, if those fields will benefit from an index.

Dave,

Just wondering if you can answer me this on Indexing;
If you have several Indexes setup only on individual fields, do these effect
queries which use several fields which have different indexes, or do we need
to build an index with all of the effected fields?

e.g.
Index on CompanyName
Index on PersonName

select PersonName, CompanyName
where PersonName like '%smith%' and CompanyName like '%IBM%'

Would this use the 2 indexes, or would I need an index on PersonName and
CompanyName?

Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133

"Websites for the real world"

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to