MySQL Forums
Forum List  »  Performance

Fastest way to decide whether entry exsited in table?
Posted by: Lisheng Sun
Date: October 14, 2004 05:37PM

hi, all
I have a one-column table, and it contains 45 million different entries, and i have more data which i need to classify whether they are already in this big table or not.
I use "select count(*) from table_name where key_stirng = 'the_string_i_need_to_compare' ", if the result is 0, then it's not in the table, otherwise it's in the table already. It works, but u know it's dirty slow.
so what's the fastest/faster way to implement that?
I use perl DBI to connect mysql.
Thanks.

Options: ReplyQuote


Subject
Views
Written By
Posted
Fastest way to decide whether entry exsited in table?
3836
October 14, 2004 05:37PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.