MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:John Hinton Date:January 29 2003 12:35pm
Subject:Cardinality doesn't auto start
View as plain text  
mysql  Ver 11.18 Distrib 3.23.54, for pc-linux (i686)

----INDEXING PROBLEM----

I'm building an application which will have a self install script,
intended for use by many people. One particular area of the program
requires the need for an index. If I create this index when I build the
table 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 is in the table, it
should be given a default cardinality of 0 and the count continue as
data is entered.

This need to create/recreate the index after data is written, is tough
to deal with as a programmer having to ask the end user to create this
index after data is gathered.

Any ideas besides creating an index creater script for the user to run
later?

Would this be considered a bug?

---- SQL to create table with index ----

CREATE TABLE somename (
  ndx int(10) NOT NULL auto_increment,
  d_now int(7) default NULL,
  adate timestamp(14) NOT NULL,
  PRIMARY KEY  (ndx),
  UNIQUE KEY id (ndx),
  KEY d_now (d_now)
) TYPE=MyISAM;

---- end SQL -------

I have also tried it with d_now set to NOT NULL with the same results.
The index just won't start counting with no data entered.

-- 
John Hinton - Goshen, VA.
http://www.ew3d.com
Thread
Cardinality doesn't auto startJohn Hinton29 Jan
RE: Cardinality doesn't auto startPeter Grigor29 Jan
  • Re: Cardinality doesn't auto startJohn Hinton30 Jan