skip to Main Content

MYSQL count(DISTINCT an AUTO_INCREMENT column)

The following result is quite surprising. MySQL [emicall_cc_man]> SELECT count(DISTINCT `id`) from call_record; +----------------------+ | count(DISTINCT `id`) | +----------------------+ | 2197537 | +----------------------+ 1 row in set (1.32 sec) MySQL [emicall_cc_man]> SELECT count(`id`) from call_record; +-------------+ | count(`id`) | +-------------+…

VIEW QUESTION

Multiples SELECT in MySql

I try to multiple select in MySql but it doesn't work. Example : SELECT (SELECT column1, column2 FROM table1 WHERE column3='something') AS query1, (SELECT column4 FROM table1 WHERE column4='something') AS query2 And the result i try to have is something…

VIEW QUESTION

Mysql – Does InnoDB behind the scenes ALSO use table locks?

Connection1: BEGIN; SELECT * FROM world.city WHERE ID = 130 FOR SHARE; Connection2: SELECT engine, thread_id, object_schema, object_name, lock_type, lock_mode, lock_status, lock_data FROM performance_schema.data_locks; +--------+-----------+---------------+-------------+-----------+---------------+-------------+-----------+ | engine | thread_id | object_schema | object_name | lock_type | lock_mode | lock_status |…

VIEW QUESTION
Back To Top
Search