MySQL Forums
Forum List  »  MyISAM

Re: Table as fifo
Posted by: Zsolt Kendi
Date: November 16, 2010 03:03PM

"Is that soutbl? And also desttbl? "
Yes all subject table structure indentical but shared for load sharing reason.

"And the SELECT looks something like
INSERT INTO bb SELECT * FROM aa WHERE C4 < '...' LIMIT 1"
Actually the "fifo feeder" where is WHERE C2=[selectedvalue]. This select nearly dozen row (group of). But according our tests this provide a same load like WHERE C4 < '...'. Remember C2 and C4 indexed.
The "fifo purger" is DELETE FROM bb ORDER BY C4 ASC LIMIT n. The n is nearly 100 detremined by complex calculation based on TABLE STATUS of bb.

This two operation take a way the 10+40 (feeder+purger) percent of CPU. Again looks like the precentage just depend from number of "parking" rows in bb table.

"If the WHERE clause is more complicated, it might be using tmp tables on disk, which could be hitting the "other mount". "
Exchause me but the config become littelbit complex. In that case the tmpdir pointed to separated directory of the ramdisk.

"Please do EXPLAIN SELECT ... with the actual select that is in the INSERT...SELECT."
+----+-------------+-----------+------+---------------+------+---------+-------+------+-------------+
| id | select_type | table     | type | possible_keys | key  | key_len | ref   | rows | Extra       |
+----+-------------+-----------+------+---------------+------+---------+-------+------+-------------+
|  1 | SIMPLE      | aa        | ref  | C2            | C2   | 5       | const |    3 | Using where |
+----+-------------+-----------+------+---------------+------+---------+-------+------+-------------+

Options: Reply• Quote


Subject
Views
Written By
Posted
7635
November 12, 2010 03:40AM
2821
November 13, 2010 10:34AM
2821
November 13, 2010 12:14PM
2388
November 13, 2010 08:13PM
2171
November 14, 2010 01:01PM
1942
November 14, 2010 07:03PM
2416
November 15, 2010 02:14PM
1991
November 16, 2010 12:51AM
Re: Table as fifo
2736
November 16, 2010 03:03PM
1882
November 16, 2010 08:35PM
2548
November 17, 2010 01:13PM
2013
November 18, 2010 12:01AM
2292
November 18, 2010 12:25PM


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.