Re: [PHP] Best practices for using MySQL index

[email protected] (Chris)
Newsgroups php.general
Message-ID <[email protected]>
>> Point above about spread still applies, but if you
>> can join index to index, the join goes a lot faster.  (A primary key in
>> MySQL
>> is always indexed.)
>>
> How much is the *a lot*? Thanks. :)

If it's a unique (including primary) key then orders of magnitude for
millions of rows.

If it's a non-unique key, it depends on how many distinct values there are.

-- 
Postgresql & php tutorials
http://www.designmagick.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.