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
7106
November 12, 2010 03:40AM
2558
November 13, 2010 10:34AM
2463
November 13, 2010 12:14PM
2013
November 13, 2010 08:13PM
1966
November 14, 2010 01:01PM
1742
November 14, 2010 07:03PM
2135
November 15, 2010 02:14PM
1692
November 16, 2010 12:51AM
Re: Table as fifo
2398
November 16, 2010 03:03PM
1692
November 16, 2010 08:35PM
2202
November 17, 2010 01:13PM
1810
November 18, 2010 12:01AM
2027
November 18, 2010 12:25PM


Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

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.