mysql insert from select ran out of memory?
I am trying to insert into a table (A) by selecting data from a different table (B). I wrote the query, it is working fine, but the size of table B is too large. So the query seems to be breaking after inserting 23k rows.
Can some one suggest me is there any way to solve with mysq开发者_如何学Cl configuration. I know one way would be to break the insert query with where condition, but if i'll be able to solve it with configuring mysql, my life will be a lot easier.
Edit the my.cnf file for MySQL and increase the sort_buffer_size
Not sure what you should set it to for your request but you can experiment a bit.
If this doesn't work out you could try increasing other buffer sizes as well but you should back up the my.cnf file before doing this.
精彩评论