Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Index problem: best index to use

Author  Topic 

CaioToOn
Starting Member

6 Posts

Posted - 2009-08-06 : 09:34:41
Hi, there!

I have a table with crescent content... until now, it's on 5,000,000.

This table have two fields PARTNER INTEGER and DESCRIPTION VARCHAR(500).

I need to seek into that table every match for a given text, within a partner.

I don't know if I'm using the best index type and would like to get any advice about this subject.

I'm currently using a BTREE INDEX( partner, description ) but the queries are taking too long to resolve (2-3secs), I would like to speed it up. Is there a way?

Thank you, guys!
CaioToOn!

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2009-08-06 : 10:19:36
>>I'm currently using a BTREE INDEX

Are you using Oracle? This site is exclusively for MS Sql Server.

Be One with the Optimizer
TG
Go to Top of Page

CaioToOn
Starting Member

6 Posts

Posted - 2009-08-06 : 10:28:03
quote:
Originally posted by TG
Are you using Oracle? This site is exclusively for MS Sql Server.



Hi, TG.

No, I'm not using Oracle, I'm using MySQL.

But what would be the best solution on MSSQL? Maybe there is a similar index on MySQL.

Thank you!
CaioToOn!
Go to Top of Page

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2009-08-06 : 12:04:30
for ms sql server an index won't be of use if you are searching for partners that contain some text (as opposed to begins with). You would need to have implemented full-text search to do that.

Be One with the Optimizer
TG
Go to Top of Page

CaioToOn
Starting Member

6 Posts

Posted - 2009-08-06 : 13:47:30
quote:
Originally posted by TG

for ms sql server an index won't be of use if you are searching for partners that contain some text (as opposed to begins with). You would need to have implemented full-text search to do that.

Be One with the Optimizer
TG



I just found that MySQL already have some implementations of full-text search. You're right, the better way to make the content searchable is using full-text search engine, even in MySQL. Thank you, very much.

CaioToOn!
Go to Top of Page
   

- Advertisement -