I'm Canadian, so when I see "provincial_id" I assume Canadian provinces. If 
so, we have only 12 provinces and territories (or is it 13 now with 
Nunavit?). On top of that, most of the population is in Ontario and Quebec, 
so you will likely get huge result sets on certain id's.

MySQL, or almost any other properly indexed database will fetch that  very 
quickly, but what happens after you fetch? Will post-processing cause 
script time outs?

If this is for some other country, where there's a broader distribution of 
provincial id's, my apologies for the assumption. Might still be worthwhile 
thinking about the size of the results.

Miles

At 01:41 PM 12/14/2001 +0100, Michel Laine wrote:
>Andy wrote:
>
> > Hi there,
> >
> > I am wondering if I could have MySQL as a DB for an Application which needs
> > to have access a table of 1 Mio entries.
> > And how long would it take to get an entry out of it. Asuming it contains
> > only a name field and an id.
> > e.g.
> >
> > select name
> > from cities
> > where provincial id = 2
> >
> > If it works, how could I optimize the table?
> >
>
>Even with 1mio entries this should go fast since the table and the select is
>simple.
>Just make sure you have a index on the most sought field (provincial id?) and
>you should be set.
>
>I myself have a 300.000 post * 12 field dev.DB - used with a "select n..n+12
>from table where n=ZZ AND n=YY" running on a Pentium 120 / 32M / W95.
>On this old metal scrump a normal query take less than 1 sec.
>So my guess is that you have the speed you want allready.
>However, there is possible to increase the speed by making tables read only /
>cache tables and so on (read in the MySQL manual), but try the normal approach
>first as MySQL (and any other DB) is pretty fast when the table and query 
>is as
>simple as this.
>
>Just my $0.1 worth.
>--
>
>Michel Laine
>
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to