On Mon, Jan 21, 2002 at 05:18:35PM +0100, Roger Baklund wrote:
> Hi,
> 
> Also, I wonder what is the best order for my primary keys:
> 
> a int        This is the 'main' id, very many distinct values
> b tinyint    This is a source code, possible values are 1 or 2
> c smallint   Some counter
> d tinyint    Another counter
> 
>   or
> 
> b tinyint    This is a source code, possible values are 1 or 2
> a int        This is the 'main' id, very many distinct values
> c smallint   Some counter
> d tinyint    Another counter
> 
> Which will perform faster, when all lookups use both a and b?

Is this helpful at all?

  http://www.linux-mag.com/2001-06/mysql_01.html

It covers compound indexes (among other topics).

Jeremy
-- 
Jeremy D. Zawodny, <[EMAIL PROTECTED]>
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936

MySQL 3.23.41-max: up 19 days, processed 440,731,871 queries (264/sec. avg)

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to