note
DrZaius
First off, if you want your code at all portable, do not use <code>REPLACE</code>. It is mysql specific (as far as I know).
<p>
Next, indexes are great. Try <code>EXPLAIN</code>ing your queries. That will give you a clue on what is going down.
<p>
Finally, make a function to check if the id exists and [cpan://memioze] it.
This is essentially creating a perl cache, but it is transparent to you.
87439
87439