In the database we have a table where all the file names are stored.This table is queried every 1 minute by the application to see a file name already exists or not, So the query is designed as,
The filename is around 190 charecters in length and there are about 100k records in the table and it is effecting performance, I have put an index on the filename, but still it does not show a significant change on the perfromance. All 100k records needs to stay in the table, for a month or so. but even for first 100k itself, i see it cracking up. any way we can fine tune this query?
asked Aug 31 '11 at 01:33 PM in Default
Is there a pattern to the filenames that could be used to create a computed column from? You say the files all have the same pattern inside them, the rest is different every minute. If that is so, you could create the computed column to fish out the relevant filename part, then index that column. You then change your query to access the computed column and it should fly.@Kevin feasel's suggestion of full text indexing would be my next step if my suggestion didn't work out.
answered Sep 01 '11 at 12:41 PM
It sounds like your business needs a better naming convention for file names. What you are doing is very inefficient...
answered Nov 16 '11 at 02:28 AM