Re: Constant MySQL Lookups in one script...

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: Constant MySQL Lookups in one script...
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-13238@lists.php.net to get a copy of this message
Hmmm ... it depends how the databse is constructed. I think the use of an index on table rows speeds up the time it takes for an RDMS to retrieve data from the actual database itself.. Give it a go.. Cheers. Russ On Thu, 11 Oct 2001 02:48:22 -0400 "PHPGalaxy.com" <archive@php.la> wrote: > 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/ > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > #-------------------------------------------------------# "Believe nothing - consider everything" Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge e: r.j.michell@apu.ac.uk w: www.apu.ac.uk/webteam www.theruss.com #-------------------------------------------------------#

« previous php.db (#13238) next »