best way to find data from column when data is large..

hi all, its very urgent in 30min i need pls..

I have a column in table with size 1000 characters. If i wan't to find  the data in the column,how can i find it easily and ensuring a better performance?

like operator or full scanning or how?

thanks in adv

March 31st, 2014 8:43am

Hi,

To search the data use LIKE operator. Or full-text searching to those columns, and use the full-text query capabilities of SQL Server.

But while using LIKE  to improve performance you need to look at some recommendations. Refer to the Below Site.

ttp://myitforum.com/cs2/blogs/jnelson/archive/2007/11/16/108354.aspx

In brief it says.

  • If your filter criteria uses equals = and the field is indexed, then most likely it will use an INDEX/CLUSTERED INDEX SEEK
  • If your filter criteria uses LIKE, with no wildcards (like if you had a parameter in a web report that COULD have a % but you instead use the full string), it is about as likely as #1 to use the index. The increased cost is almost nothing.
  • If your filter criteria uses LIKE, but with a wildcard at the beginning (as in Name0 LIKE '%UTER') it's much less likely to use the index, but it still may at least perform an INDEX SCAN on a full or partial range of the index.
  • HOWEVER, if your filter criteria uses LIKE, but starts with a STRING FIRST and has wildcards somewhere AFTER that (as in Name0 LIKE 'COMP%ER'), then SQL may just use an INDEX SEEK to quickly find rows that have the same first starting characters, and then look through those rows for an exact match.

(Also keep in mind, the SQL engine still might not use an index the way you're expecting, depending on what else is going on in your query and what tables you're joining to. The SQL engine reserves the right to rewrite your query a little to get the data in a way that it thinks is most efficient and that may include an INDEX SCAN instead of an INDEX SEEK)

For FULL TEXT Concept you can refer to the below Link.

http://technet.microsoft.com/en-us/library/ms142571.aspx

Free Windows Admin Tool Kit Click here and download it now
March 31st, 2014 9:16am

thanks for your reply..it was usefull:-)
April 1st, 2014 4:00am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics