1 (edited by spott 11/13/2025 08:41:35 am)

Topic: Could not retrieve last order detail - Error

Hello,
This morning I suddenly discovered that I can no longer create any invoices in FrontAccounting. The invoice lines are missing and, when selecting a customer – some can be selected, but actively used customers cannot.
I turned on Debug mode and I get the following error message:

ANDMEBAASI VIGA: Could not retrieve last order detail
error code : 1104
error message : 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
sql that failed was : SELECT stk_code FROM 0_sales_order_details d LEFT JOIN 0_sales_orders o on d.order_no=o.order_no WHERE debtor_no='676' ORDER BY d.id DESC LIMIT 1

How can this be resolved?


EDIT: As I understand it, the problem is that the database is too large and there are too many rows. Indeed, I have been actively using FrontAccounting since 2009. The database size is over 200 MB. I would like to delete some older financial years, but for some reason this is not possible. I also don’t get any error messages, even when debug mode is enabled.
Is it somehow possible to delete old entries directly via phpMyAdmin using an SQL command? I would gladly remove several years and make the database smaller.