Huge memory usage on INSERT INTO ... SELECT

Bug #898570 reported by Adrian Partl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Spider for MySQL
Fix Released
Medium
Kentoku SHIBA

Bug Description

We have 8e9 rows in a Spider table, distributed over 4 mysql nodes.
If we now want to copy that data from one Spider table on the head
node to another Spider table (again distributed over 4 mysql nodes)
using

INSERT INTO foo SELECT * FROM huge_spider_table

the head node will use up all memory and eventually crash.

It seams, that the Spider engine first copies all the data retrieved
by the SELECT into memory and then passes that on to the new
table.

Possible resolution:
- Stream and buffer results from the huge_spider_table to the new
one, bypassing the need to have everything in memory.

- use on disk temporary table

Revision history for this message
Kentoku SHIBA (kentokushiba) wrote :

Fixed at 2.28.
Please try "quick_mode = 3".

Changed in spiderformysql:
status: New → Fix Committed
assignee: nobody → Kentoku SHIBA (kentokushiba)
importance: Undecided → Medium
Changed in spiderformysql:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.