dai.hop
07-10-2009, 04:23 AM
Good morning all,
I have the following query:
UPDATE r_lines, r_orders SET r_lines.order_id = r_orders.id WHERE r_lines.order_id = r_orders.transaction_id
The aim of this query is to replace the transaction id's in the r_lines.order_id field with the order id's in r_orders.id.
When I execute this query (via phpMyAdmin) I always get an "Internal Server Error" page after 30 seconds or so. I'm of the opinion that the query is inefficent in some way and is overloading the server.
Table stats:
r_orders
Rows: 16,781
r_lines
Rows: 31,926
Can anyone tell me why the query is causing this error or better still, suggestion an amendment to allow it to run normally?!
Thanks,
dai.hop
I have the following query:
UPDATE r_lines, r_orders SET r_lines.order_id = r_orders.id WHERE r_lines.order_id = r_orders.transaction_id
The aim of this query is to replace the transaction id's in the r_lines.order_id field with the order id's in r_orders.id.
When I execute this query (via phpMyAdmin) I always get an "Internal Server Error" page after 30 seconds or so. I'm of the opinion that the query is inefficent in some way and is overloading the server.
Table stats:
r_orders
Rows: 16,781
r_lines
Rows: 31,926
Can anyone tell me why the query is causing this error or better still, suggestion an amendment to allow it to run normally?!
Thanks,
dai.hop