Hi guys,
My table rows look like this: (INT,INT,TEXT). I want to make sure I don't insert a row where the TEXT field matches one already in there.
Is there an easy way to do that ?
Thank you.
Not adding duplicates ?
Moderator: General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Hi,
Is there a more efficient way ? If my table has 10,000 rows that's 10,000 string comparisons per insert statement. If I insert 100 new rows that's 1,000,000 string comparisons, it will be slow. I guess it has to be done that way but maybe MySQL has internal optimizations to handle something like that.
Thanks.
Is there a more efficient way ? If my table has 10,000 rows that's 10,000 string comparisons per insert statement. If I insert 100 new rows that's 1,000,000 string comparisons, it will be slow. I guess it has to be done that way but maybe MySQL has internal optimizations to handle something like that.
Thanks.
-
R0d Longfella
- Forum Newbie
- Posts: 20
- Joined: Fri Apr 08, 2005 7:17 am