MySQL Forums
Forum List  »  Partitioning

Re: A first table partitioning exercise.
Posted by: Rick James
Date: December 02, 2010 11:00PM

SHOW VARIABLES LIKE '%buffer%'; -- To see the MyISAM index cache
SHOW TABLE STATUS LIKE '%part_tab'; -- To see the table size
How much RAM do you have? -- To see if it might hold all the data.

It could have been that all the data was in RAM.

Recommend running each SELECT twice in a row, and posting the second time.

I would expect Data_length to be about 200MB (for MyISAM), and essentially 0 for Index_length. The author was running in only 1GB of RAM, so the MYD may have spilled to disk, especially after creating one table from the other.

Well, I could not get it either:
mysql> select count(*) from no_part_tab where
    ->  c3 > date '1995-01-01' and c3 < date '1995-12-31';
+----------+
| count(*) |
+----------+
|   795181 |
+----------+
1 row in set (7.42 sec)
1 row in set (6.37 sec)  <-- run again

mysql> select count(*) from    part_tab where
    ->  c3 > date '1995-01-01' and c3 < date '1995-12-31';
+----------+
| count(*) |
+----------+
|   795181 |
+----------+
1 row in set (0.43 sec)
1 row in set (0.45 sec)  <-- run again

| key_buffer_size | 57671680 | -- on a 4GB machine.
(OK, the key_buffer is irrelevant since there are no indexes.)

I did not get 800000 rows since the first and last days of the year are excluded.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: A first table partitioning exercise.
1795
December 02, 2010 11:00PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.