April 12, 2006 at 3:06 pm
I would like to introduce some type of paging on a table with a large result set. Basically, i would like to group all Vendors by first character.
I was curious if a where vendor_name like 'a%' would kill server performance. This table contains a very large number of records.
April 12, 2006 at 3:08 pm
Possibly, you might try WHERE LEFT(vendor_name, 1) = 'a'... that might work better.
April 12, 2006 at 3:08 pm
If you have an index on vendor_name, a 'where vendor_name like 'a%' should result in an index seek. If you don't have an index on this column, consider adding one.
April 12, 2006 at 3:11 pm
thanks for the suggestions.
April 12, 2006 at 6:02 pm
LIKE 'A%' can give you great performance... If you have an index on the column, as someone else mentioned.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply