Re: Another question on Cardinality??

2006-08-04 Thread Brent Baisley
I didn't say consider a table with a thousand rows, must have been someone elses response. But anyway, it comes down to knowing your data. If you know your data, then you can create the best set of indexes. I would almost never create an index on a field with a cardinality of 2. Howev

Re: Another question on Cardinality??

2006-08-04 Thread Philip Mather
Brent, Given that... You really have to match cardinality with distribution of values. ...sounds like hard work (well you actually have to think about it) and... considering all the above cases, what should I conclude? should I have indexes on these three fields? Looking for a specific

Re: Another question on Cardinality??

2006-08-04 Thread Brent Baisley
7;s not an even distribution, like people under/over 70, and you will always be searching on people above 70, then an index may help since it will narrow the records down considerably. You really have to match cardinality with distribution of values. An index should allow you to quickly narrow the set o

Re: Another question on Cardinality??

2006-08-04 Thread Martin Jespersen
on on cardinality. Consider a table with 1000 rows and columnns. Details of the columns are as below: FLD_1 - int - cardinality 1000 - PRIMARY KEY FLD_2 - tinyint- cardinality 400 FLD_3 - varchar - cardinality 10 FLD_4 - varchar - cardinality 2 FLD_5 - varchar - cardinality 5 Assuming

Another question on Cardinality??

2006-08-04 Thread Ratheesh K J
Hello all, Another question on cardinality. Consider a table with 1000 rows and columnns. Details of the columns are as below: FLD_1 - int - cardinality 1000 - PRIMARY KEY FLD_2 - tinyint- cardinality 400 FLD_3 - varchar - cardinality 10 FLD_4 - varchar - cardinality 2 FLD_5 - varchar

Cardinality

2006-08-04 Thread Ratheesh K J
-- Totally 26 rows Now when I saw the Cardinality of this col ( COLUMN1 ) by doing a SHOW INDEX on TBL_XXX, It shows 93. How can this be possible, as Cardinality should be the number of distinct values ( 26 in this case ) for that column right

RE: mysql index cardinality

2005-02-28 Thread mel list_php
Nobody to explain me that? From: "mel list_php" <[EMAIL PROTECTED]> To: mysql@lists.mysql.com Subject: mysql index cardinality Date: Fri, 25 Feb 2005 16:47:12 + Hi, A strange thing with index, I thought the cardinality was automatically updated (like for a primary key for e

mysql index cardinality

2005-02-25 Thread mel list_php
Hi, A strange thing with index, I thought the cardinality was automatically updated (like for a primary key for exemple). When I use a primary key in a table, insert a row, the cardinality is increased of 1 as well. I just tried to do that with an INDEX, and the cardinality is none unless I

RE: Index cardinality lost

2004-05-21 Thread Victor Pendleton
As a preventive maintenance and the handle fragmentation running a nightly mysqltablecheck may prove to be beneficial. -Original Message- From: Jude Insley To: [EMAIL PROTECTED] Sent: 5/21/04 7:10 AM Subject: RE: Index cardinality lost > After what action are you indexes becom

RE: Index cardinality lost

2004-05-21 Thread Jude Insley
> After what action are you indexes becoming invalid? Are you running nightly > maintenance? What is the table type? We are not running nightly maintenance but we do run the INSERT DELAYED as a batch during the night. The loss of cardinality seems to happen after a number of days but w

RE: Index cardinality lost

2004-05-21 Thread Victor Pendleton
After what action are you indexes becoming invalid? Are you running nightly maintenance? What is the table type? -Original Message- From: Jude Insley To: [EMAIL PROTECTED] Sent: 5/21/04 6:00 AM Subject: Index cardinality lost We have a set of tables which are losing the cardinality on

Index cardinality lost

2004-05-21 Thread Jude Insley
We have a set of tables which are losing the cardinality on the first part of the primary key. A simple CHECK TABLE or ANALYZE table restores the cardinality. We are running MySQL 4.0.18 on Solaris 8. *** 1. row *** Table: UserSessions

Cardinality Bug ?

2003-12-19 Thread trevor%tribenetwork.com
Hello, I was able to duplicate the following sequence in both 4.0.14-max and 4.0.16. It happens in all my tables. I do not understand why the cardinality for the date_created field does not = 223284. mysql> select count(distinct date_created) from POST

RE: cardinality in SHOW INDEX

2003-11-06 Thread Dathan Vance Pattishall
Use analyze table to calculate cardinality. - Dathan Vance Pattishall   - Sr. Programmer and mySQL DBA for FriendFinder Inc.   - http://friendfinder.com/go/p40688 -->-Original Message- -->From: Hsiu-Hui Tseng [mailto:[EMAIL PROTECTED] -->Sent: Thursday, November 06, 2003 4:46

cardinality in SHOW INDEX

2003-11-06 Thread Hsiu-Hui Tseng
Hi, Some time I saw cardinality in SHOW INDEX is null. Why this happening? Then, I did a OPTIMIZE TABLE on the table and the number was getting back. We are going to switch all of our table to innodb. Will innodb has this problem? If it happend, how to fix it in innodb. Using OPTIMIZE TABLE? Is

RE: Why is it better to have a composite key with the largest cardinality 1st?

2003-07-10 Thread Rudy Metzger
(C) THEN lookup 2 entries (B) and THEN lookup 10K entries (A). But however exactly this is implemented is beyond my knowledge. As for general indexing and tuning, it is always better to use keys with high cardinality than keys with low one. Cheers /rudy -Original Message- From: Dathan

Why is it better to have a composite key with the largest cardinality 1st?

2003-07-09 Thread Dathan Vance Pattishall
with a large cardinality. Is this true? Is this a hook for the optimizer? What is the internal logic for mySQL that makes this so? Is this a myth and have I been misled? -- Dathan

Re: Cardinality for FULLTEXT-indexes MySQL 4.0.10

2003-02-24 Thread Sergei Golubchik
t; > Regards, > Tobias Lind It's ok, as "cardinality" is meaningless for FULLTEXT indexes. > Hi! > I have a question regarding "Cardinality" for FULLTEXT-indexes. > > I have a table with 9 indexes - the last 3 indexes are FULLTEXT. > When I run &qu

Cardinality for FULLTEXT-indexes MySQL 4.0.10

2003-02-24 Thread Tobias Lind
Hello! I never got any comment on this one... Have noone else observed this behavior? I'm a bit worried to use this in my production site without knowing if it's and indication of some problem with FULLTEXT indexes... :) Regards, Tobias Lind Hi! I have a question regarding "C

Cardinality for FULLTEXT-indexes MySQL 4.0.10

2003-02-22 Thread Tobias Lind
Hi! I have a question regarding "Cardinality" for FULLTEXT-indexes. I have a table with 9 indexes - the last 3 indexes are FULLTEXT. When I run "show index from ", the last index (FULLTEXT) always shows cardinality=NULL... Is this normal? ...everything seems to work ok when I

Re: Cardinality doesn't auto start

2003-01-30 Thread John Hinton
mply find it frustating that MySQL does not start its cardinality count automatically when an index is created at the time the table it created. It has been counting perfectly when I create the index after data is in the table. There also seems to be a 'isamchk -a' function which is supposed

RE: Cardinality doesn't auto start

2003-01-29 Thread Grigor, Peter
you do this from scrips pretty easy. Peter <^_^> > -Original Message- > From: John Hinton [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 29, 2003 7:36 AM > To: [EMAIL PROTECTED] > Subject: Cardinality doesn't auto start > > > mysql Ver 11.18

Cardinality doesn't auto start

2003-01-29 Thread John Hinton
le or apparently even after the table is built but before any data is written to the table, cardinality is shown as 'None' (using phpMyAdmin) and futhermore it does not start counting until after data is entered and the index is recreated. Seems like when the index is created, if no data

Cardinality and index using

2002-06-06 Thread Vlad Shalnev
Hi, all I am using mysql - 3.23.46, Intel, Solaris 8 Some questions: 1) Why cardinality value don't automaticly change when query change set of unique values in index ( insert or update ) ? Example: mysql> create table a ( a int not null, index ( a ) ); Query OK, 0 rows affected (

Cardinality and index using

2002-05-31 Thread Vlad Shalnev
Hi, all I am using mysql - 3.23.46, Intel, Solaris 8 Some questions: 1) Why cardinality value don't automaticly change when query change set of unique values in index ( insert or update ) ? Example: mysql> create table a ( a int not null, index ( a ) ); Query OK, 0 rows affected (