You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
HI Nick
I think we briefly discussed this a while back but the time has come for me to take action.
My orderitems and order tables are huge, over a million lines and some functions are getting a little slow, so I need to separate the old orders into their own tables.
Looking for a pointer to rewrite the code for various functions so the result is pulled from 2 or more tables(I might split tables into years such as ecom_orders_2014, etc)
Based on the orderman_searchp function, would it be better to have single mysql statement that includes UNION so multi tables are checked?
The problem there is $this->CORE_DB->sql_do(array('sql' => $sql, 'table' => 'ecom_orders', only allows one table to be checked, so would probably mean rewriting the sql_do function as well.
or would it be better/easier to run sql_do function individually for each tables and then do an array_merge
Offline
We have a solution for this in 9.1.0, which we're going to push out this month. In 9.1.0 we introduced an archive tables for orders, order items and payments. The archives hold all order data older than 400 days. We changed the ordersave() and orderlookup() functions to handle this. I'd advise waiting for the update.
Offline
Thanks Nick. I look forward to 9.1.0
For now, I have hacked orderlookup() and ordersearchp() so the correct database is searched based on the year the order was placed.
Backend works great.
Frontend users can only view orders since 2017 which is probably more than enough.
Offline
Any updates on 9.1.0 release date yet?
Offline
Hi Nick
Can you let me know if the mod for splitting the database tables is ready yet.
If it isn't, please let me know so I can put my hack into my revamped site.
Offline