in reply to MySQL 5.1.11 Select Query

Do a SHOW PROCESSLIST while the query is hanging and see what state it's in. If the result set is large, it may just be taking a while to load it all into memory.

Replies are listed 'Best First'.
Re^2: MySQL 5.1.11 Select Query
by bkiahg (Pilgrim) on Aug 05, 2008 at 17:35 UTC
    I ran a SHOW PROCESSLIST while it was hanging and it does show a sleep being ran:
    mysql> show processlist\g +-----+-----------+----------------+---------------+---------+------+- +------+--- ---------------+ | Id | User | Host | db | Command | Time | +State | In fo | +-----+-----------+----------------+---------------+---------+------+- +------+--- ---------------+ | 84 | root | localhost:1332 | rate_calc | Sleep | 1 | + | NU LL | | 92 | WebClient | localhost:1346 | sch_oxitest08 | Sleep | 957 | + | NU LL | | 100 | root | localhost:1356 | rate_calc | Query | 0 | +NULL | sh ow processlist | | 106 | root | localhost:1364 | rate_calc | Sleep | 18 | + | NU LL | +-----+-----------+----------------+---------------+---------+------+- +------+--- ---------------+ 4 rows in set (0.00 sec)
      Are you sure one of those sleeping connections is the one you ran the query on? Another thing you might try is DBI_TRACE. That shows you what DBI is doing.
        Yes I'm sure, I ran it several times and each time a new instance showed up right after I initiated the query.

        How do I do a DBI_TRACE? I apologize, new to that function.

        I think what the problem might be is my DBD-MySQL is version 2.9002 and the latest is 4.005. I'm going to upgrade that after hours tonight and see if that fixes this issue.