Суть в том, что эти строчки периодически извлекаются по 1-2шт, когда-то больше, а когда-то меньше, можно и всё сразу, не так важно.Нужно знать по какому принципу извлекают те самые строки.
create_connection_mysql_db('localhost',
а почему localhost?SELECT COUNT(`id`) AS `count` FROM `users` WHERE `name` = '$name'
SELECT 1 FROM `users` WHERE `name` = '$name' LiMIT 1
Потому что пользователей считать не надо. Достаточно получить ненулевую выборку.SHOW processlist
[
{"property": "Звук", "value": "При нажатии ..."},
...
]
WHERE events.name = %s
.Requires Microsoft Windows 10 Professional or Enterprise 64-bit.
ALGORITHM=INSTANT
к синтаксису:ALTER TABLE table_name [alter_specification], ALGORITHM=INSTANT;
The benefit of the INSTANT algorithm is that only metadata changes are made in the data dictionary. There is no need to acquire metadata lock during SE changes and we don’t touch the data of the table.
INSERT INTO `table1` (`date`, `message`) VALUES (?, ?)
ON DUPLICATE KEY UPDATE
message = IF(VALUES(`date`) > `date`, VALUES(message), message),
`date` = IF(VALUES(`date`) > `date`, VALUES(`date`), `date`)
Можно загрузить этот файл в базу данных MySQL, по аналогии с CSV?Штатной утилитой по-моему, нет.
SELECT
date(event_time) as event_date
, extract(HOUR_MINUTE from event_time) as hour_min
, extract(SECOND from event_time) as sec
, count(*) as cnt
FROM table1
where event_time is not null
group by date(event_time), extract(HOUR_MINUTE from event_time), extract(SECOND from event_time);
SELECT
`event_time` - INTERVAL EXTRACT(SECOND FROM `event_time`) SECOND as no_sec
, count(*) as cnt
FROM table1
group by `event_time` - INTERVAL EXTRACT(SECOND FROM `event_time`) SECOND
order by event_time;
default-character-set=utf8 default-collation=utf8_general_ci
--