SELECT /*!N SQL_NO_CACHE */ * FROM `table` - What is this?

43
November 29, 2018, at 02:30 AM

I just enabled mysql slow query logging.

Now I see these queries being logged on different tables time to time:

SELECT /*!40001 SQL_NO_CACHE */ * FROM `paitents`;
# Time: 181128  6:38:50
# User@Host: my_testdatabase[my_testdatabase] @ localhost []
# Query_time: 2.964142  Lock_time: 0.000081 Rows_sent: 3  Rows_examined: 1606915

I just searched and found out that it might be the database dump causing these queries.

But I want to make sure that its the mysql dump not some unauthorized access.

This is the latest log from that specific table in my logs right now:

SELECT /*!40001 SQL_NO_CACHE */ * FROM `paitents`;
# Time: 181128  6:38:50
# User@Host: my_testdatabase[my_testdatabase] @ localhost []
# Query_time: 2.964142  Lock_time: 0.000081 Rows_sent: 3  Rows_examined: 1606915

And here is the logs of dumps that were created:

-rw-r--r-- 1 root root 381511206 Nov 23 23:21 my_testdatabase_2018-11-23.sql.tar.bz2
-rw-r--r-- 1 root root 381754145 Nov 24 23:21 my_testdatabase_2018-11-24.sql.tar.bz2
-rw-r--r-- 1 root root 381999764 Nov 25 23:21 my_testdatabase_2018-11-25.sql.tar.bz2
-rw-r--r-- 1 root root 382146325 Nov 26 23:22 my_testdatabase_2018-11-26.sql.tar.bz2
-rw-r--r-- 1 root root 382357755 Nov 27 23:23 my_testdatabase_2018-11-27.sql.tar.bz2
-rw-r--r-- 1 root root 382384209 Nov 28 06:29 my_testdatabase_2018-11-28.sql.tar.bz2

Now here I can see the difference in the latest query logged in slow query log and the latest dump created.

Latest query logged time: 181128 6:38:50 Latest dump created time: 2018-11-28 06:29

Why is there a difference?

READ ALSO
how to find the distance traveled by user in a particular year?

how to find the distance traveled by user in a particular year?

I want to find the total distance traveled by a user in a particular year

36
MySQL COUNT DISTINCT

MySQL COUNT DISTINCT

I'm trying to collect the number of distinct visits in my cp yesterday, then count them

35
Save only the current time in a column - MySQL

Save only the current time in a column - MySQL

I have this table and I want to save in my column hora_inicio_uso only the current time

51
Match '%' sign when searching in MySQL database

Match '%' sign when searching in MySQL database

I would like to match this 'wildcard %' in MySQLI tried using escape \% and it is not working

14