All pastes #1596147 Raw Edit

Something

public text v1 · immutable
#1596147 ·published 2009-10-05 23:21 UTC
rendered paste body
mysql> show full processlist ;
+-------+---------------+-----------+---------------+---------+------+----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Id    | User          | Host      | db            | Command | Time | State          | Info                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
+-------+---------------+-----------+---------------+---------+------+----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|  9950 | sportzone     | localhost | sportzone     | Sleep   | 7414 |                | NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 
|  9951 | sportzone     | localhost | sportzone     | Query   | 4240 | Sending data   | REPLACE INTO civicrm_temp_custom_entityID_13a4a9a7c7a89fb8f11c8371c6073de1 ( entity_id )

SELECT ca.id 
FROM   civicrm_activity ca, civicrm_activity_target cat, civicrm_contact c, civicrm_email e
LEFT JOIN civicrm_option_group og ON og.name = 'activity_type'
LEFT JOIN civicrm_option_value ov ON ( ov.option_group_id = og.id ) 
WHERE  cat.activity_id = ca.id
AND    cat.target_contact_id = c.id
AND    ( c.display_name LIKE '%magpie%' OR
         ( e.email LIKE '%magpie%' AND cat.target_contact_id = e.contact_id AND 
           ca.activity_type_id = ov.value AND ov.name IN ('Inbound Email', 'Email') ) )

 LIMIT 10 | 
| 11489 | sportzone     | localhost | sportzone     | Sleep   | 2828 |                | NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 
| 11490 | sportzone     | localhost | sportzone     | Query   | 2827 | Sending data   | REPLACE INTO civicrm_temp_custom_entityID_e1f525d5a50cd9f6a1c73285f808a456 ( entity_id )

SELECT ca.id 
FROM   civicrm_activity ca, civicrm_contact c, civicrm_email e
LEFT JOIN civicrm_option_group og ON og.name = 'activity_type'
LEFT JOIN civicrm_option_value ov ON ( ov.option_group_id = og.id ) 
WHERE  ca.source_contact_id = c.id
AND    ( c.display_name LIKE '%tsf 094 - nairn%' OR
         ( e.email LIKE '%tsf 094 - nairn%' AND ca.source_contact_id = e.contact_id AND 
           ca.activity_type_id = ov.value AND ov.name IN ('Inbound Email', 'Email') ) )

 LIMIT 10                                              | 
| 11492 | sportzone     | localhost | sportzone     | Sleep   | 2824 |                | NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 
| 11493 | sportzone     | localhost | sportzone     | Query   | 2823 | Sending data   | REPLACE INTO civicrm_temp_custom_entityID_21fe9042803d81ed7ea814db92120957 ( entity_id )

SELECT ca.id 
FROM   civicrm_activity ca, civicrm_contact c, civicrm_email e
LEFT JOIN civicrm_option_group og ON og.name = 'activity_type'
LEFT JOIN civicrm_option_value ov ON ( ov.option_group_id = og.id ) 
WHERE  ca.source_contact_id = c.id
AND    ( c.display_name LIKE '%tsf 094 - nairn%' OR
         ( e.email LIKE '%tsf 094 - nairn%' AND ca.source_contact_id = e.contact_id AND 
           ca.activity_type_id = ov.value AND ov.name IN ('Inbound Email', 'Email') ) )

 LIMIT 10                                              | 
| 11532 | sportzone     | localhost | sportzone     | Sleep   | 2644 |                | NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 
| 11533 | sportzone     | localhost | sportzone     | Query   | 2642 | Sending data   | REPLACE INTO civicrm_temp_custom_entityID_f244fdb240bfedca8474e145f5acbb84 ( entity_id )

SELECT ca.id 
FROM   civicrm_activity ca, civicrm_contact c, civicrm_email e
LEFT JOIN civicrm_option_group og ON og.name = 'activity_type'
LEFT JOIN civicrm_option_value ov ON ( ov.option_group_id = og.id ) 
WHERE  ca.source_contact_id = c.id
AND    ( c.display_name LIKE '%tsf 094 - nairn%' OR
         ( e.email LIKE '%tsf 094 - nairn%' AND ca.source_contact_id = e.contact_id AND 
           ca.activity_type_id = ov.value AND ov.name IN ('Inbound Email', 'Email') ) )

 LIMIT 10                                              | 
| 12203 | fuzone        | localhost | fuzone        | Query   |    0 | Opening tables | DELETE FROM notifications_event WHERE counter = 0 AND created < 1254784462                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | 
| 12206 | chrisburgess  | localhost | NULL          | Query   |    0 | NULL           | show full processlist                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | 
| 12207 | livingstreets | localhost | livingstreets | Sleep   |    1 |                | NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 
+-------+---------------+-----------+---------------+---------+------+----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
11 rows in set (0.12 sec)


======================================================

+----+-------------+-------+--------+----------------------------------------------------------------------+-------------------------------+---------+---------------------------+------+-------------+
| id | select_type | table | type   | possible_keys                                                        | key                           | key_len | ref                       | rows | Extra       |
+----+-------------+-------+--------+----------------------------------------------------------------------+-------------------------------+---------+---------------------------+------+-------------+
|  1 | SIMPLE      | e     | ALL    | FK_civicrm_email_contact_id                                          | NULL                          | NULL    | NULL                      | 2233 |             | 
|  1 | SIMPLE      | og    | const  | UI_name                                                              | UI_name                       | 194     | const                     |    1 | Using index | 
|  1 | SIMPLE      | ov    | ref    | index_option_group_id_name                                           | index_option_group_id_name    | 4       | sportzone.og.id           |    2 |             | 
|  1 | SIMPLE      | c     | ALL    | PRIMARY                                                              | NULL                          | NULL    | NULL                      | 4050 | Using where | 
|  1 | SIMPLE      | cat   | ref    | UI_activity_target_contact_id,FK_civicrm_activity_target_activity_id | UI_activity_target_contact_id | 4       | sportzone.c.id            |    3 | Using index | 
|  1 | SIMPLE      | ca    | eq_ref | PRIMARY                                                              | PRIMARY                       | 4       | sportzone.cat.activity_id |    1 | Using where | 
+----+-------------+-------+--------+----------------------------------------------------------------------+-------------------------------+---------+---------------------------+------+-------------+
6 rows in set (0.02 sec)