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: ReplyQuote


Subject
Views
Written By
Posted
6833
November 12, 2010 03:40AM
2382
November 13, 2010 10:34AM
2370
November 13, 2010 12:14PM
1917
November 13, 2010 08:13PM
1821
November 14, 2010 01:01PM
1632
November 14, 2010 07:03PM
1959
November 15, 2010 02:14PM
1616
November 16, 2010 12:51AM
Re: Table as fifo
2251
November 16, 2010 03:03PM
1603
November 16, 2010 08:35PM
2084
November 17, 2010 01:13PM
1707
November 18, 2010 12:01AM
1932
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.