Whats better query with long where in condition or many small queries?
- by DCrystal
Maybe it's a little dumb, but i'm just not sure what is better.
If i have to check about 30k rows in db for existanse, what i'd do?
#1 - one query
select id from table1 where name in (smth1,smth2...{till 30k})
#2 - many queries
select id from table1 where name=smth1
Though, perfomance is not the goal, i don't want to go down with mysql either ;)
Maybe, any other solutions will be more suitable...
Thanks.