[ic] Optimisation Tip
Stefan Hornburg (Racke)
racke at linuxia.de
Wed Jul 31 06:58:18 UTC 2013
On 07/30/2013 10:47 PM, IC wrote:
> Hi Folks,
>
> Whilst trying to optimise IC for speed today I noticed a slow sql query
> every time an order was updated, I eventually traced it to /etc/ship_notice
>
> This loop tag:-
>
> [loop prefix=item search="
> fi=orderline
> st=db
> sf=order_number
> se=[loop-code]
> ml=1000
> "]
>
> Produces an sql query of select * from orderline;
>
> If the orderline table has a few hundred thousand rows it returns them all
> and causes quite a delay, I replaced it with:-
>
> [query
> prefix=item
> sql=|select * from orderline where order_number = '[loop-code]'|
> type=list
> ]
> [item-list]
>
> Then used [item-param column_name] for the columns in the email, now its
> lightning quick at updating an order.
>
Do you mind to produce a patch or even a Github pull request to get
this into the Interchange repository?
Regards
Racke
--
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team
More information about the interchange-users
mailing list