dotnetfly
dotnetfly

Reputation: 190

MemSql: a long enough query sql has truncated,change 'max_allowed_packet' has no effect

i have a long enough sql, example: "select customerID from customer where customerID in (1,2,3,4,5,......50000000)", when i executed it,then a exceptions throw out..., i find memsql truncate my query sql, but i has changed the Global VARIABLES "max_allowed_packet=1049999360,load_data_read_size=1049999360,load_data_write_size=1049999360" and restart memsql cluster, however the question of truncate as usual, help me pls. thanks。enter image description here

Upvotes: 1

Views: 264

Answers (1)

Adam Prout
Adam Prout

Reputation: 739

You may be running into the limit on the number of constants in a query. It’s 1 million. Before MemSQL 6.5 this would generate a syntax error instead of a more specific error referring to the limit. That limit isn’t configurable.

As others have noted this may not be the most effiecient way to run this query. You may want to try building a temporary table and doing an in (select custid from temp) instead.

Upvotes: 1

Related Questions