I have a very simple query
select count(*) from user_access where user_name='mike'
on a table
+-----------+-------------+------+-----+-------------------+-----------------------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+-------------+------+-----+-------------------+-----------------------------+
| user_name | varchar(32) | NO | PRI | NULL | |
| sample_id | int(11) | NO | PRI | 0 | |
| updated | timestamp | NO | | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
+-----------+-------------+------+-----+-------------------+-----------------------------+
I have tried this over the network and on the host itself and either way it hangs
| 14051 | | localhost | nir | Query | 677 | Sending data | select count(*) from user_access where user_name='mike'
Here is a list of the buffers & caches & such
+---------------------------------------------------+----------------------+
| Variable_name | Value |
+---------------------------------------------------+----------------------+
| binlog_cache_size | 32768 |
| binlog_stmt_cache_size | 32768 |
| bulk_insert_buffer_size | 8388608 |
| delayed_queue_size | 1000 |
| innodb_additional_mem_pool_size | 8388608 |
| innodb_buffer_pool_size | 134217728 |
| innodb_log_buffer_size | 8388608 |
| innodb_log_file_size | 5242880 |
| innodb_purge_batch_size | 20 |
| join_buffer_size | 131072 |
| key_buffer_size | 16777216 |
| key_cache_block_size | 1024 |
| large_page_size | 0 |
| max_binlog_cache_size | 18446744073709547520 |
| max_binlog_size | 104857600 |
| max_binlog_stmt_cache_size | 18446744073709547520 |
| max_heap_table_size | 16777216 |
| max_join_size | 18446744073709551615 |
| max_long_data_size | 67108864 |
| max_relay_log_size | 0 |
| metadata_locks_cache_size | 1024 |
| myisam_data_pointer_size | 6 |
| myisam_max_sort_file_size | 9223372036853727232 |
| myisam_mmap_size | 18446744073709551615 |
| myisam_sort_buffer_size | 8388608 |
| performance_schema_events_waits_history_long_size | 10000 |
| performance_schema_events_waits_history_size | 10 |
| preload_buffer_size | 32768 |
| profiling_history_size | 15 |
| query_alloc_block_size | 8192 |
| query_cache_size | 16777216 |
| query_prealloc_size | 8192 |
| range_alloc_block_size | 4096 |
| read_buffer_size | 131072 |
| read_rnd_buffer_size | 262144 |
| sort_buffer_size | 2097152 |
| sql_max_join_size | 18446744073709551615 |
| thread_cache_size | 8 |
| tmp_table_size | 16777216 |
| transaction_alloc_block_size | 8192 |
| transaction_prealloc_size | 4096 |
+---------------------------------------------------+----------------------+
If there is other data that someone would like to see, I'll get it.
There is a pretty vanilla query. Can anyone suggest a place to look for the problem?
The output of EXPLAIN is
+----+-------------+-------------+-------+---------------+---------+---------+------+-------+--------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------------+-------+---------------+---------+---------+------+-------+--------------------------+
| 1 | SIMPLE | user_access | index | NULL | PRIMARY | 38 | NULL | 57224 | Using where; Using index |