Let's say I have a table of the normal person-type information.  This
table also has about 10,000 records.

I have an index on BirthDate, but not on LastName.

I run a query to pull all people who were born in the last few years.  I
get 10 records returned from the query and I want to sort by LastName.

My question is, with this small amount of "returned" records, would an
index on LastName be beneficial?

I was with the understanding that a RDBMS would create temporary/working
tables that join with records pulled from physical tables and,
eventually, remove records as needed.  Then, the sort operation happens.
If that is true, then there would be very few records in the
temporary/working table and an index would not be beneficial.

Any words of advice?  I can add as many indices as needed since the
inserts will come from a form, not a batch job, where performance of an
insert is not critical.

Thanks

M!ke


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186669
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to