in reply to How to count rows using DBI & mysql - Performance results
If you just test for existence, you can use the exists function in a bit of sql-code:
if not exists (select * from depend where usedby='Depend::Module' AND +uses='DBI') begin insert .... end
An index on the columns in where clause might have a huge impact if you use count(*).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How to count rows using DBI & mysql - Performance results
by Brovnik (Hermit) on Jun 11, 2001 at 15:37 UTC | |
by busunsl (Vicar) on Jun 11, 2001 at 18:09 UTC | |
by elwarren (Priest) on Jun 11, 2001 at 22:45 UTC |