Re: Primary keys in tables [restarted]

2005-06-16 Thread SGreen
"Peter Normann" <[EMAIL PROTECTED]> wrote on 06/16/2005 02:15:34 PM: > Sorry guys, > I just learned that ctrl-return would send the email you are composing, so I > got cut off short, so let me try again :-/ > It appears to be usual practice from what I can see in this list to use a > primary k

Re: Primary Keys, Multiple Index and Searching

2005-02-26 Thread Gleb Paharenko
Hello. > So in this case MySQL will choose to use the largest index that suits MySQL will choose index which returns less rows. > Given the high cardinality of `manufacturer` Cardinality - the number of unique values in the index. So manufacturer index usually has low cardinality and k

Re: Primary Keys, Multiple Index and Searching

2005-02-25 Thread Jonathan Wright
Gleb Paharenko wrote: Hello. If you have a separate indexes on section and status columns, MySQL will use only one of them. And as the column status has very small number of possible values the cardinality of separate index on it will be too low and optimizer won't use this index. I think, if slow

Re: Primary Keys, Multiple Index and Searching

2005-02-25 Thread Gleb Paharenko
Hello. If you have a separate indexes on section and status columns, MySQL will use only one of them. And as the column status has very small number of possible values the cardinality of separate index on it will be too low and optimizer won't use this index. I think, if slow updates won't be

RE: Primary Keys

2004-07-20 Thread SGreen
is: > > COS/SHOP > ID_Cust (PK) > ID_Shop (PK) > > Costumer ? 1 : N ? COS/SHOP > Shopping list ? 1 : N ? COS/SHOP > > Thanks > > > > De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Enviada: terça-feira, 20 de Julho de 2004 17:06 > Para: Rui Monteir

Re: Primary Keys

2004-07-20 Thread SGreen
Your example has 1 Primary Key and 2 Foreign Keys. Please post a sample data structure and state (not in SQL) what situation you want to achieve. If you need more constraints on the table to prevent creating duplicates you can create additional UNIQUE Keys but, by definition, any table should

Re: Primary keys

2004-03-24 Thread Egor Egorov
w in set (0.00 sec) >>From: Egor Egorov <[EMAIL PROTECTED]> >>To: [EMAIL PROTECTED] >>Subject: Re: Primary keys >>Date: Wed, 24 Mar 2004 13:28:58 +0200 >> >>"JOHN MEYER" <[EMAIL PROTECTED]> wrote: >> > Is there a way to do a SQL Select a

Re: Primary keys

2004-03-24 Thread JOHN MEYER
So I can do something like "SELECT * FROM " . $tablename . "WHERE _rowid=" $id (I'm using PHP and the primary key is a unique integer column in each of the tables). From: Egor Egorov <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Re: Primary keys Date: Wed, 2

Re: Primary keys

2004-03-24 Thread Egor Egorov
"JOHN MEYER" <[EMAIL PROTECTED]> wrote: > Is there a way to do a SQL Select and get a record without specifying the > primary key. Example. I have two tables CANDLE and VOTIVES. Can I define > a select that says "SELECT * FROM TABLE WHERE PRIMARY_KEY="... > No, You can't. Only if PRIMARY or

Re: primary keys

2002-09-25 Thread Paul DuBois
At 11:55 -0700 9/23/02, johnbarri wrote: >Hi - I'm a mysql newbie. As I've yet to discover a method of batching mysql >commands I prefer to input lengthy instructions (such as large file >structures) in stages, so input errors can be dealt with more easily. For >example, I first define table str

Re: primary keys with several parameters

2001-07-06 Thread karel pitra
the combination is unique so iyou dont get an error On Fri 6. July 2001 14:04, you wrote: > Hi all! > > Sorry for the dumb question, but am I right in the following suggestion: > > I have the following table: > > create table tab_1 ( > field_1 integer not null, > field_2 integer not

Re: primary keys with several parameters

2001-07-06 Thread Joseph Bueno
üÄÕÁÒÄ óÕÒÏ× wrote: > > Hi all! > Hi, > Sorry for the dumb question, but am I right in the following suggestion: > > I have the following table: > > create table tab_1 ( > field_1 integer not null, > field_2 integer not null, > primary key (field_1, field_2)); > > Do