Hi,

I am having a difficult time with a query. My environment is MySQL v4.0.16 (InnoDB tables) running on Linux (latest 2.4 kernel). Basically, I am running a query of the form:

INSERT INTO temp_tbl
SELECT c1,c2...
FROM t1,t2,t3,t4
WHERE ...

It is a very complex query, which looks at millions of rows of data to produce results. The issue is this:

When running from the MySQL command line:
Normally, when the query is run, it takes about 5 minutes to complete.
When I LOCK t1,t2,t3,t4 before running, it takes 8 seconds to run.

When I put this LOCKing code into my PHP script, the LOCKing code has no effect! The LOCK code still takes 5 minutes.

I can replicate this issue every time. Can anyone point me in the right direction? I can provide more detail if there is someone here that can help.

Thanks...

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to