Constant MySQL Lookups in one script...

From: Date: Thu, 11 Oct 2001 06:48:22 +0000
Subject: Constant MySQL Lookups in one script...
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-13228@lists.php.net to get a copy of this message
Congratulate me on my first question posted to this list! =) Here's my scenario: I have a search engine script (2 actually) that I've been running a while, sorta stress-testing it =) it automatically builds its database by having a meta search engine perform a lookup if the database turns up nothing, and then automatically adding those URLs to the database. Here's the problem: To make sure the URL isnt already in the database, it select's id from db where url = '$url' (smallest item it can pull from the DB). Now, with 110,000+ records, it seems to be slowing down alot, as it looks up each URL. Here's the question: Does anyone have any ideas on doing a quicker duplicate check? I'm open to pretty much anything =) - Tim PHP Galaxy: http://www.phpgalaxy.com/ The LavaWarp Engine: http://www.phpgalaxy.com/engine.php3 BitSearch: http://www.phpgalaxy.com/bitsearch.php3 MetaWarp: http://www.phpgalaxy.com/metawarp.php3 PhotoRate: http://www.phpgalaxy.com/photorate.php3 Earn $10 per order selling these scripts on your site! http://www.phpgalaxy.com/aff/

« previous php.db (#13228) next »