Jump to content

Request SQL MAX_JOIN_SIZE


Recommended Posts

Hi all,

Does anybody have this message error on the back office:

The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay

 

It'a appear when I want to see my client list, I have only 15 clients.

It worked last days and I have changed nothing in my data base

 

Could you help please?

 

Thanks

Link to comment
Share on other sites

  • 2 months later...

I have the same problem for 1.5.6.2 and 1.6, but in a bit different place: on the back office when I'm trying to find a product for the new order.

I've found solution for my case: add the line: "Db::getInstance()->execute('SET SQL_BIG_SELECTS=1');" in the classes/Product.php to the method: "searchByName" just before query execution.

I believe there is some general place where we can put "SET SQL_BIG_SELECTS=1", but I don't know where it is. 

Edited by KPACHblu (see edit history)
Link to comment
Share on other sites

  • 7 months later...

Hi!  I am using 1.6, I try to click on Catalog and then products and then I get this message.  Will not display my products.  Please advise.

 

Bad SQL query
The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay

 

Thank you

Link to comment
Share on other sites

  • 3 weeks later...

@lpar1976

 

I got the same problem as you in my 1.5.6.2 when I tried to display Products or Carts in back-office.

I assume the issue happened to me after I start to delete hundreds of products.

 

I run REPAIR TABLE for ps_image table and it fixed my problem. If it will not fix your problem, try to repair and optimize all the tables involved in the SQL Query that fails.

 

If still it's not working for you, add:

 

Db::getInstance(_PS_USE_SQL_SLAVE_)->execute('SET SQL_BIG_SELECTS=1');

 

in constructor of controllers/admin/AdminProductsController and AdminCartsController but at next presta update you have to remember to put it back or put the modified files in override/controllers/admin/.

 
 
 
 

 

Hi!  I am using 1.6, I try to click on Catalog and then products and then I get this message.  Will not display my products.  Please advise.

 

Bad SQL query
The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay

 

Thank you

Link to comment
Share on other sites

×
×
  • Create New...