Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: How to count rows using DBI & mysql - Performance results

by tune (Curate)
on Jun 11, 2001 at 18:08 UTC ( #87493=note: print w/ replies, xml ) Need Help??


in reply to How to count rows using DBI & mysql - Performance results

Just a short tip:
The REPLACE function from MYSQL. It checks if the row is existing, and doing an INSERT (if not), or an UPDATE (if it is). However if you do not want the UPDATE feature, it does not help you.

--
tune


Comment on Re: How to count rows using DBI & mysql - Performance results
Re: Re: How to count rows using DBI & mysql - Performance results
by Brovnik (Hermit) on Jun 11, 2001 at 18:51 UTC
    I tried that, but REPLACE only works on a unique index. I need to be able to have e.g.
    COL1 COL2 A B A C A D B C C D B D
    So neither column is unique.
    --
    Brovnik

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://87493]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2014-04-20 21:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (487 votes), past polls