The data isn't in the .frm;  That only holds the structure of the table.

Your data is in the .MYD file of the same name, and indexes are in the .MYI 
file.

-----Original Message-----
From: Elim PDT [mailto:e...@pdtnetworks.net]
Sent: Friday, September 17, 2010 11:29 AM
To: mysql@lists.mysql.com
Subject: prime number table

I got a file of the list of the 1st 1270607 prime numbers (the 1270607th
prime is 19999999,
beat the $227 book at
http://www.amazon.com/prime-numbers-Carnegie-institution-Washington/dp/B0006AH1S8).
the file is an output of a python script. the file size is about 12Mb.

Then I created a simeple mysql table prime as

mysql> desc prime;
+----------+------------------+------+-----+---------+----------------+
| Field    | Type             | Null | Key | Default | Extra          |
+----------+------------------+------+-----+---------+----------------+
| oid      | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| pv       | int(10) unsigned | YES  |     | NULL    |                |
| descript | text             | YES  |     | NULL    |                |
+----------+------------------+------+-----+---------+----------------+
mysql> show create table prime;
--------------------------------------------------------------------------+
| Table | Create Table
--------------------------------------------------------------------------+
| prime | CREATE TABLE `prime` (
  `oid` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `pv` int(10) unsigned DEFAULT NULL,
  `descript` text,
  PRIMARY KEY (`oid`)
) ENGINE=MyISAM AUTO_INCREMENT=1270608 DEFAULT CHARSET=latin1

The table file size is (prime.frm,prime.MYD,prime.MYI) = (9k; 24,817KB;
12,754KB)

Then I do
mysql> create table prm select * from prime order by prime.oid;
mysql> alter table prm modify oid int unsigned primary key auto_increment;

mysql> desc prm;
+----------+------------------+------+-----+---------+----------------+
| Field    | Type             | Null | Key | Default | Extra          |
+----------+------------------+------+-----+---------+----------------+
| oid      | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| pv       | int(10) unsigned | YES  |     | NULL    |                |
| descript | text             | YES  |     | NULL    |                |
+----------+------------------+------+-----+---------+----------------+

mysql> show create table prm;
+-------+------------------------------------------------------------------
| Table | Create Table
+-------+------------------------------------------------------------------
| prm   | CREATE TABLE `prm` (
  `oid` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `pv` int(10) unsigned DEFAULT NULL,
  `descript` text,
  PRIMARY KEY (`oid`)
) ENGINE=InnoDB AUTO_INCREMENT=1270608 DEFAULT CHARSET=latin1 |
+-------+------------------------------------------------------------------

The table file prm.frm is only 9KB

My question is that how come it's SO SMALL? (currently the colum description
in both tables prime and prm are empty except one identical row, with very
short string value.

Is is recommend to index the other twoo columns?

Thanks


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=gto...@ffn.com


This message contains confidential information and is intended only for the 
individual named.  If you are not the named addressee, you are notified that 
reviewing, disseminating, disclosing, copying or distributing this e-mail is 
strictly prohibited.  Please notify the sender immediately by e-mail if you 
have received this e-mail by mistake and delete this e-mail from your system. 
E-mail transmission cannot be guaranteed to be secure or error-free as 
information could be intercepted, corrupted, lost, destroyed, arrive late or 
incomplete, or contain viruses. The sender therefore does not accept liability 
for any loss or damage caused by viruses or errors or omissions in the contents 
of this message, which arise as a result of e-mail transmission. [FriendFinder 
Networks, Inc., 220 Humbolt court, Sunnyvale, CA 94089, USA, FriendFinder.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to