Forum Moderators: coopster

Message Too Old, No Replies

Searching a table with several varchars

         

musicales

11:55 am on Jul 7, 2003 (gmt 0)

10+ Year Member



I need to search on a table that has 3 or 4 columns which each have upto 1000 characters of text.

Does anyone know whether searching such a table will be slower than searching one that just has 1 column of such a length?

jatar_k

5:31 pm on Jul 7, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



If you are searching through 4 cols of 100 char each it will be slower than searching through 1 of 1000 char.

Though I am not sure if you meant 1 col of 4000. I would think that the the single field would be faster but I haven't benchmarked it in any way, just a guess really. I would think that accessing one big chunk once per row would be less work then accessing 4 smaller ones 4 times per row.

Either way it looks like a whole ton of searching.

musicales

6:24 pm on Jul 7, 2003 (gmt 0)

10+ Year Member



cheers. Sorry I didn't phrase it well. I meant would searching one column of 1000 be slower in a table that happened to have 4 other columns of 1000 - I wouldn't be searching the other columns but just wondered whether having them there in the same table would slow things up at all.

jatar_k

7:58 pm on Jul 7, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I would think that if you are specifically accessing that column and not doing select * with multiple column equals it shouldn't hinder performance, though I am not 100% sure.