RE: [PHP-DB] How to speed up querries in a humangous db?

From: Date: Wed, 26 Dec 2001 16:46:52 +0000
Subject: RE: [PHP-DB] How to speed up querries in a humangous db?
Groups: php.db 
Request: Send a blank email to php-db+get-15225@lists.php.net to get a copy of this message
You could always categorize parts of the data and split it into separate tables. For instance, if you have a LOT of United States countries, you can duplicate the table, but keep only the U.S. country-records in the second table, and everything else in the first table. Then, before querying the database, use your PHP or Perl code or whatever you use in order to specify which table to use. - Jonathan -----Original Message----- From: Andy [mailto:news.letters@gmx.de] Sent: Wednesday, December 26, 2001 12:41 AM To: php-db@lists.php.net Subject: Re: [PHP-DB] How to speed up querries in a humangous db? this is my sql statement: $stmt= " SELECT * from $geo_T3 WHERE country_code = '$country' AND province = '$province' order by city ASC "; cheers Andy "Miles Thompson" <milesthompson@ns.sympatico.ca> schrieb im Newsbeitrag news:5.0.2.1.0.20011225222605.01cc2870@pop1.ns.sympatico.ca... > > To help with that we'd have to know how your queries are phrased. Please > show us. > > Are you having to do a type conversion on the tinyint field? > > Miles Thompson > > At 02:07 AM 12/26/2001 +0100, Andy wrote: > >Hi there, > > > >I have a huge table with over 2 million entries. It takes to long to make a > >querry. No I am thinking about the datatypes. Maybe there is a better way. I > >have already indexed the search fields ( which made the table 75 MB big!!!) > > > >My table looks like that: > > > >field1 : varchar100 > >field2 : char2 > >field3 : tinyint2 > > > >I have an index on field 2 and 3 > > > >The SQL Querry is searching for: field 2 AND field 3 > > > >Does anybody have an Idea how to spead this up? > > > >Thanx in advance, > > > >Andy > > > > > > > >-- > >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 > -- 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

« previous php.db (#15225) next »