I am running Ver 8.8 Distrib 3.23.22-Beta on RedHat Linux.  I have two
databases, foo and bar.
Below I show the output of mysqladmin processlist. Pid 5 is executing a
long-running select from the event table of
db foo. Pid 1 (started after pid 5) is attempting an insert in the same
event table. It makes sense that this would block
and it does.

Now, Pid 6, started after both 1 and 5, is executing an insert in the Sensor
table of the other db, bar. I don''t see why 
this should block, but it does! Is this a feature of MySql or does it have
to do with the thread package on linux, perhaps?

BTW, is there a way to speed up a select with distinct keyword? There is a
temporary file in /tmp that is being 
actively accessed. I am guessing that this is the temporary table being
creatd by pid 5. Correct?

Thanks for your attention,

        Bob

+----+--------+-----------+-----------+---------+------+--------------------
--+-------------------------------------------------------------------------
-------
| Id | User   | Host      | db        | Command | Time | State
| Info

+----+--------+-----------+-----------+---------+------+--------------------
--+-------------------------------------------------------------------------
-------
| 1  | snorty | localhost | foo  | Query   | 6156 | update               |
INSERT INTO event (sid,cid,signature,timestamp) VALUES ('1', '253550',
'<137.219.43.24;984619820.161 |
| 4  | root    | localhost |           | Query   | 0    |
| show processlist

| 5  | root    | localhost | foo     | Query   | 6535 | Copying to tmp table
| select distinctrow signature from event

| 6  | root    | localhost | bar    | Query   | 5076 | update
| insert INTO Sensor VALUES ('SensorTwo','Second Test Sensor','Bishop')
|
| 9  | root    | localhost | foo     | Sleep   | 665  |
|

+----+--------+-----------+-----------+---------+------+--------------------
--+-------------------------------------------------------------------------
-------
----------------------+

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to