KevinTheJedi Its 24KB log file. I was not sure if it can be posted here.
I find Mysql very painful & resource hungry, hence the choice for Mariadb
/usr/libexec/mariadbd, Version: 10.5.22-MariaDB-log (MariaDB Server). started with:
Tcp port: 0 Unix socket: /var/lib/mysql/mysql.sock
Time Id Command Argument
# Time: 240523 13:25:00
# User@Host: root[root] @ localhost []
# Thread_id: 3 Schema: ostfm QC_hit: No
# Query_time: 0.000237 Lock_time: 0.000023 Rows_sent: 130 Rows_examined: 228
# Rows_affected: 0 Bytes_sent: 7607
use ostfm;
SET timestamp=1716470700;
SELECT A1.* FROM `ost_config` A1 WHERE A1.`namespace` = 'core';
# User@Host: root[root] @ localhost []
# Thread_id: 3 Schema: ostfm QC_hit: No
# Query_time: 0.001560 Lock_time: 0.001461 Rows_sent: 1 Rows_examined: 2
# Rows_affected: 0 Bytes_sent: 614
SET timestamp=1716470700;
SELECT A1.* FROM `ost_plugin` A1 ORDER BY A1.`name` ASC;
# User@Host: root[root] @ localhost []
# Thread_id: 3 Schema: ostfm QC_hit: No
# Query_time: 0.000600 Lock_time: 0.000052 Rows_sent: 34 Rows_examined: 68
# Rows_affected: 0 Bytes_sent: 591
SET timestamp=1716470700;
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'ost_staff' AND TABLE_SCHEMA = DATABASE() ORDER BY ORDINAL_POSITION;
# User@Host: root[root] @ localhost []
# Thread_id: 3 Schema: ostfm QC_hit: No
# Query_time: 0.000597 Lock_time: 0.000025 Rows_sent: 14 Rows_examined: 28
# Rows_affected: 0 Bytes_sent: 257
SET timestamp=1716470700;
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'ost_queue' AND TABLE_SCHEMA = DATABASE() ORDER BY ORDINAL_POSITION;
# User@Host: root[root] @ localhost []
# Thread_id: 3 Schema: ostfm QC_hit: No
# Query_time: 0.000542 Lock_time: 0.000032 Rows_sent: 5 Rows_examined: 10
# Rows_affected: 0 Bytes_sent: 152
SET timestamp=1716470700;
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'ost_queue_sort' AND TABLE_SCHEMA = DATABASE() ORDER BY ORDINAL_POSITION;
# User@Host: root[root] @ localhost []
# Thread_id: 3 Schema: ostfm QC_hit: No
# Query_time: 0.001958 Lock_time: 0.001637 Rows_sent: 24 Rows_examined: 93
# Rows_affected: 0 Bytes_sent: 8203
SET timestamp=1716470700;
SELECT A1.`id`, A1.`parent_id`, A1.`columns_id`, A1.`sort_id`, A1.`flags`, A1.`staff_id`, A1.`sort`, A1.`title`, A1.`config`, A1.`filter`, A1.`root`, A1.`path`, A1.`created`, A1.`updated`, CASE WHEN A1.`sort` = 0 THEN 999 ELSE A1.`sort` END AS `_sort`, A2.`id`, A2.`parent_id`, A2.`columns_id`, A2.`sort_id`, A2.`flags`, A2.`staff_id`, A2.`sort`, A2.`title`, A2.`config`, A2.`filter`, A2.`root`, A2.`path`, A2.`created`, A2.`updated`, A3.`id`, A3.`root`, A3.`name`, A3.`columns`, A3.`updated` FROM `ost_queue` A1 LEFT JOIN `ost_queue` A2 ON (A1.`parent_id` = A2.`id`) LEFT JOIN `ost_queue_sort` A3 ON (A1.`sort_id` = A3.`id`) WHERE (A1.`flags` & 2 != 0 OR A1.`staff_id` = 1) AND NOT A1.`flags` & 4 != 0 ORDER BY A1.`parent_id` ASC, `_sort` ASC, A1.`title` ASC;
# User@Host: root[root] @ localhost []
# Thread_id: 3 Schema: ostfm QC_hit: No
# Query_time: 0.000796 Lock_time: 0.000053 Rows_sent: 11 Rows_examined: 22
# Rows_affected: 0 Bytes_sent: 220
SET timestamp=1716470700;
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'ost_form_field' AND TABLE_SCHEMA = DATABASE() ORDER BY ORDINAL_POSITION;
# User@Host: root[root] @ localhost []
# Thread_id: 3 Schema: ostfm QC_hit: No
# Query_time: 0.000328 Lock_time: 0.000034 Rows_sent: 10 Rows_examined: 20
# Rows_affected: 0 Bytes_sent: 207
SET timestamp=1716470700;
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'ost_form' AND TABLE_SCHEMA = DATABASE() ORDER BY ORDINAL_POSITION;
# User@Host: root[root] @ localhost []
# Thread_id: 3 Schema: ostfm QC_hit: No
# Query_time: 0.001096 Lock_time: 0.000995 Rows_sent: 1 Rows_examined: 2
# Rows_affected: 0 Bytes_sent: 715
SET timestamp=1716470700;
SELECT A1.* FROM `ost_list` A1 ORDER BY A1.`name` ASC;
# User@Host: root[root] @ localhost []
# Thread_id: 3 Schema: ostfm QC_hit: No
# Query_time: 0.000576 Lock_time: 0.000032 Rows_sent: 4 Rows_examined: 8
# Rows_affected: 0 Bytes_sent: 152
SET timestamp=1716470700;
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'ost_form_entry_values' AND TABLE_SCHEMA = DATABASE() ORDER BY ORDINAL_POSITION;
# User@Host: root[root] @ localhost []
# Thread_id: 3 Schema: ostfm QC_hit: No
# Query_time: 0.000670 Lock_time: 0.000068 Rows_sent: 7 Rows_examined: 14
# Rows_affected: 0 Bytes_sent: 183
SET timestamp=1716470700;
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'ost_queue_columns' AND TABLE_SCHEMA = DATABASE() ORDER BY ORDINAL_POSITION;
# User@Host: root[root] @ localhost []
# Thread_id: 3 Schema: ostfm QC_hit: No
# Query_time: 0.000497 Lock_time: 0.000036 Rows_sent: 10 Rows_examined: 20
# Rows_affected: 0 Bytes_sent: 220
SET timestamp=1716470700;
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'ost_queue_column' AND TABLE_SCHEMA = DATABASE() ORDER BY ORDINAL_POSITION;
# User@Host: root[root] @ localhost []
# Thread_id: 3 Schema: ostfm QC_hit: No
# Query_time: 0.000387 Lock_time: 0.000096 Rows_sent: 24 Rows_examined: 93
# Rows_affected: 0 Bytes_sent: 8203
SET timestamp=1716470700;
SELECT A1.`id`, A1.`parent_id`, A1.`columns_id`, A1.`sort_id`, A1.`flags`, A1.`staff_id`, A1.`sort`, A1.`title`, A1.`config`, A1.`filter`, A1.`root`, A1.`path`, A1.`created`, A1.`updated`, CASE WHEN A1.`sort` = 0 THEN 999 ELSE A1.`sort` END AS `_sort`, A2.`id`, A2.`parent_id`, A2.`columns_id`, A2.`sort_id`, A2.`flags`, A2.`staff_id`, A2.`sort`, A2.`title`, A2.`config`, A2.`filter`, A2.`root`, A2.`path`, A2.`created`, A2.`updated`, A3.`id`, A3.`root`, A3.`name`, A3.`columns`, A3.`updated` FROM `ost_queue` A1 LEFT JOIN `ost_queue` A2 ON (A1.`parent_id` = A2.`id`) LEFT JOIN `ost_queue_sort` A3 ON (A1.`sort_id` = A3.`id`) WHERE (A1.`flags` & 2 != 0 OR A1.`staff_id` = 1) AND NOT A1.`flags` & 4 != 0 ORDER BY A1.`parent_id` ASC, `_sort` ASC, A1.`title` ASC;
# User@Host: root[root] @ localhost []
# Thread_id: 3 Schema: ostfm QC_hit: No
# Query_time: 0.000677 Lock_time: 0.000066 Rows_sent: 3 Rows_examined: 6
# Rows_affected: 0 Bytes_sent: 138
SET timestamp=1716470700;
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'ost_team_member' AND TABLE_SCHEMA = DATABASE() ORDER BY ORDINAL_POSITION;
# User@Host: root[root] @ localhost []
# Thread_id: 3 Schema: ostfm QC_hit: No
# Query_time: 0.001654 Lock_time: 0.001405 Rows_sent: 14 Rows_examined: 27
# Rows_affected: 0 Bytes_sent: 168
SET timestamp=1716470700;
SELECT DISTINCT d.id FROM ost_staff s LEFT JOIN ost_staff_dept_access g ON (s.staff_id=g.staff_id) INNER JOIN ost_department d ON (LOCATE(CONCAT("/", s.dept_id, "/"), d.path) OR d.manager_id=s.staff_id OR LOCATE(CONCAT("/", g.dept_id, "/"), d.path)) WHERE s.staff_id=1;
# User@Host: root[root] @ localhost []
# Thread_id: 3 Schema: ostfm QC_hit: No
# Query_time: 0.000285 Lock_time: 0.000050 Rows_sent: 24 Rows_examined: 93
# Rows_affected: 0 Bytes_sent: 8104
SET timestamp=1716470700;
SELECT A1.`id`, A1.`parent_id`, A1.`columns_id`, A1.`sort_id`, A1.`flags`, A1.`staff_id`, A1.`sort`, A1.`title`, A1.`config`, A1.`filter`, A1.`root`, A1.`path`, A1.`created`, A1.`updated`, A2.`id`, A2.`parent_id`, A2.`columns_id`, A2.`sort_id`, A2.`flags`, A2.`staff_id`, A2.`sort`, A2.`title`, A2.`config`, A2.`filter`, A2.`root`, A2.`path`, A2.`created`, A2.`updated`, A3.`id`, A3.`root`, A3.`name`, A3.`columns`, A3.`updated` FROM `ost_queue` A1 LEFT JOIN `ost_queue` A2 ON (A1.`parent_id` = A2.`id`) LEFT JOIN `ost_queue_sort` A3 ON (A1.`sort_id` = A3.`id`) WHERE (A1.`flags` & 2 != 0 OR A1.`staff_id` = 1) AND NOT A1.`flags` & 4 != 0 ORDER BY A1.`sort` ASC;
# User@Host: root[root] @ localhost []
# Thread_id: 4 Schema: ostfm QC_hit: No
# Query_time: 0.000272 Lock_time: 0.000018 Rows_sent: 130 Rows_examined: 228
# Rows_affected: 0 Bytes_sent: 7607
SET timestamp=1716470700;
SELECT A1.* FROM `ost_config` A1 WHERE A1.`namespace` = 'core';
# User@Host: root[root] @ localhost []
# Thread_id: 4 Schema: ostfm QC_hit: No
# Query_time: 0.000152 Lock_time: 0.000040 Rows_sent: 1 Rows_examined: 2
# Rows_affected: 0 Bytes_sent: 614
SET timestamp=1716470700;
SELECT A1.* FROM `ost_plugin` A1 ORDER BY A1.`name` ASC;
# Time: 240523 13:25:01
# User@Host: root[root] @ localhost []
# Thread_id: 3 Schema: ostfm QC_hit: No
# Query_time: 0.976977 Lock_time: 0.003562 Rows_sent: 1 Rows_examined: 195340
# Rows_affected: 0 Bytes_sent: 796
SET timestamp=1716470701;
SELECT COUNT(DISTINCT CASE WHEN A2.`state` = 'open' AND A2.`state` = 'open' AND A2.`state` = 'open' AND NOT A1.`dept_id` = 17 AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q15`, COUNT(DISTINCT CASE WHEN A1.`dept_id` = 17 THEN A1.`ticket_id` END) AS `q16`, COUNT(DISTINCT CASE WHEN A1.`dept_id` = 6 THEN A1.`ticket_id` END) AS `q17`, COUNT(DISTINCT CASE WHEN A1.`dept_id` = 17 THEN A1.`ticket_id` END) AS `q20`, COUNT(DISTINCT CASE WHEN A1.`dept_id` = 21 THEN A1.`ticket_id` END) AS `q21`, COUNT(DISTINCT CASE WHEN A1.`dept_id` IN (19, 20) THEN A1.`ticket_id` END) AS `q31`, COUNT(DISTINCT CASE WHEN A1.`dept_id` = 17 THEN A1.`ticket_id` END) AS `q33`, COUNT(DISTINCT CASE WHEN A1.`dept_id` = 4 THEN A1.`ticket_id` END) AS `q34`, COUNT(DISTINCT CASE WHEN A1.`dept_id` = 22 THEN A1.`ticket_id` END) AS `q45`, COUNT(DISTINCT CASE WHEN A1.`dept_id` = 15 THEN A1.`ticket_id` END) AS `q46`, COUNT(DISTINCT CASE WHEN A2.`state` = 'open' AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q1`, COUNT(DISTINCT CASE WHEN A2.`state` = 'open' AND A2.`state` = 'open' AND A1.`isanswered` = '0' AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q2`, COUNT(DISTINCT CASE WHEN (A1.`team_id` IN (1) OR A1.`staff_id` IN (1)) AND A2.`state` = 'open' AND (A1.`team_id` IN (1) OR A1.`staff_id` IN (1)) AND A2.`state` = 'open' AND A1.`staff_id` IN (1) AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q6`, COUNT(DISTINCT CASE WHEN A2.`state` = 'closed' AND A2.`state` = 'closed' AND A1.`closed` BETWEEN '2024-05-22 18:30:00' AND '2024-05-23 18:29:59' AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q9`, COUNT(DISTINCT CASE WHEN A2.`state` = 'open' AND A2.`state` = 'open' AND A1.`isanswered` = '1' AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q3`, COUNT(DISTINCT CASE WHEN (A1.`team_id` IN (1) OR A1.`staff_id` IN (1)) AND A2.`state` = 'open' AND (A1.`team_id` IN (1) OR A1.`staff_id` IN (1)) AND A2.`state` = 'open' AND NOT A1.`staff_id` IN (1) AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q7`, COUNT(DISTINCT CASE WHEN A2.`state` = 'closed' AND A2.`state` = 'closed' AND A1.`closed` BETWEEN '2024-05-21 18:30:00' AND '2024-05-22 18:29:59' AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q10`, COUNT(DISTINCT CASE WHEN A2.`state` = 'open' AND A2.`state` = 'open' AND A1.`isoverdue` = '1' AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q4`, COUNT(DISTINCT CASE WHEN (A1.`team_id` IN (1) OR A1.`staff_id` IN (1)) AND A2.`state` = 'open' AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q5`, COUNT(DISTINCT CASE WHEN A2.`state` = 'closed' AND A2.`state` = 'closed' AND A1.`closed` BETWEEN '2024-05-19 18:30:00' AND '2024-05-26 18:29:59' AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q11`, COUNT(DISTINCT CASE WHEN A2.`state` = 'closed' AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q8`, COUNT(DISTINCT CASE WHEN A2.`state` = 'closed' AND A2.`state` = 'closed' AND A1.`closed` BETWEEN '2024-04-30 18:30:00' AND '2024-05-31 18:29:59' AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q12`, COUNT(DISTINCT CASE WHEN A2.`state` = 'closed' AND A2.`state` = 'closed' AND A1.`closed` BETWEEN '2024-03-31 18:30:00' AND '2024-06-30 18:29:59' AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q13`, COUNT(DISTINCT CASE WHEN A2.`state` = 'closed' AND A2.`state` = 'closed' AND A1.`closed` BETWEEN '2023-12-31 18:30:00' AND '2024-12-31 18:29:59' AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q14` FROM `ost_ticket` A1 JOIN `ost_ticket_status` A2 ON (A1.`status_id` = A2.`id`) LEFT JOIN `ost_thread` A3 ON (A3.`object_type` = 'T' AND A1.`ticket_id` = A3.`object_id`) LEFT JOIN `ost_thread_referral` A4 ON (A3.`id` = A4.`thread_id`) LEFT JOIN `ost_staff` A5 ON (A4.`object_type` = 'S' AND A4.`object_id` = A5.`staff_id`) LEFT JOIN `ost_thread` A6 ON (A1.`ticket_id` = A6.`object_id` AND A6.`object_type` = 'C') LEFT JOIN `ost_thread_referral` A7 ON (A6.`id` = A7.`thread_id`) LEFT JOIN `ost_staff` A8 ON (A7.`object_type` = 'S' AND A7.`object_id` = A8.`staff_id`) LEFT JOIN `ost_team` B0 ON (A4.`object_type` = 'E' AND A4.`object_id` = B0.`team_id`) LEFT JOIN `ost_team` B1 ON (A7.`object_type` = 'E' AND A7.`object_id` = B1.`team_id`) LEFT JOIN `ost_department` B2 ON (A4.`object_type` = 'D' AND A4.`object_id` = B2.`id`) LEFT JOIN `ost_department` B3 ON (A7.`object_type` = 'D' AND A7.`object_id` = B3.`id`) WHERE ((A2.`state` = 'open' AND (A1.`staff_id` = 1 OR A5.`staff_id` = 1 OR A6.`object_type` = 'C' AND A8.`staff_id` = 1 OR A1.`team_id` IN (1) OR B0.`team_id` IN (1) OR A6.`object_type` = 'C' AND B1.`team_id` IN (1))) OR (A2.`state` IN ('open', 'closed') AND (A1.`dept_id` IN (1, 4, 6, 14, 15, 17, 19, 20, 21, 22, 23, 26, 27, 28) OR B2.`id` IN (1, 4, 6, 14, 15, 17, 19, 20, 21, 22, 23, 26, 27, 28))) OR A6.`object_type` = 'C' AND B3.`id` IN (1, 4, 6, 14, 15, 17, 19, 20, 21, 22, 23, 26, 27, 28));
# User@Host: root[root] @ localhost []
# Thread_id: 3 Schema: ostfm QC_hit: No
# Query_time: 0.001082 Lock_time: 0.000174 Rows_sent: 4 Rows_examined: 8
# Rows_affected: 0 Bytes_sent: 146
SET timestamp=1716470701;
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'ost_queue_sorts' AND TABLE_SCHEMA = DATABASE() ORDER BY ORDINAL_POSITION;
# Time: 240523 13:25:02
# User@Host: root[root] @ localhost []
# Thread_id: 5 Schema: ostfm QC_hit: No
# Query_time: 0.000205 Lock_time: 0.000016 Rows_sent: 130 Rows_examined: 228
# Rows_affected: 0 Bytes_sent: 7607
SET timestamp=1716470702;
SELECT A1.* FROM `ost_config` A1 WHERE A1.`namespace` = 'core';
# User@Host: root[root] @ localhost []
# Thread_id: 5 Schema: ostfm QC_hit: No
# Query_time: 0.000084 Lock_time: 0.000017 Rows_sent: 1 Rows_examined: 2
# Rows_affected: 0 Bytes_sent: 614
SET timestamp=1716470702;
SELECT A1.* FROM `ost_plugin` A1 ORDER BY A1.`name` ASC;
# User@Host: root[root] @ localhost []
# Thread_id: 5 Schema: ostfm QC_hit: No
# Query_time: 0.000455 Lock_time: 0.000040 Rows_sent: 34 Rows_examined: 68
# Rows_affected: 0 Bytes_sent: 591
SET timestamp=1716470702;
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'ost_staff' AND TABLE_SCHEMA = DATABASE() ORDER BY ORDINAL_POSITION;
# User@Host: root[root] @ localhost []
# Thread_id: 5 Schema: ostfm QC_hit: No
# Query_time: 0.000330 Lock_time: 0.000025 Rows_sent: 14 Rows_examined: 28
# Rows_affected: 0 Bytes_sent: 257
SET timestamp=1716470702;
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'ost_queue' AND TABLE_SCHEMA = DATABASE() ORDER BY ORDINAL_POSITION;
# User@Host: root[root] @ localhost []
# Thread_id: 5 Schema: ostfm QC_hit: No
# Query_time: 0.000309 Lock_time: 0.000025 Rows_sent: 5 Rows_examined: 10
# Rows_affected: 0 Bytes_sent: 152
SET timestamp=1716470702;
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'ost_queue_sort' AND TABLE_SCHEMA = DATABASE() ORDER BY ORDINAL_POSITION;
# User@Host: root[root] @ localhost []
# Thread_id: 5 Schema: ostfm QC_hit: No
# Query_time: 0.000321 Lock_time: 0.000074 Rows_sent: 24 Rows_examined: 93
# Rows_affected: 0 Bytes_sent: 8203
SET timestamp=1716470702;
SELECT A1.`id`, A1.`parent_id`, A1.`columns_id`, A1.`sort_id`, A1.`flags`, A1.`staff_id`, A1.`sort`, A1.`title`, A1.`config`, A1.`filter`, A1.`root`, A1.`path`, A1.`created`, A1.`updated`, CASE WHEN A1.`sort` = 0 THEN 999 ELSE A1.`sort` END AS `_sort`, A2.`id`, A2.`parent_id`, A2.`columns_id`, A2.`sort_id`, A2.`flags`, A2.`staff_id`, A2.`sort`, A2.`title`, A2.`config`, A2.`filter`, A2.`root`, A2.`path`, A2.`created`, A2.`updated`, A3.`id`, A3.`root`, A3.`name`, A3.`columns`, A3.`updated` FROM `ost_queue` A1 LEFT JOIN `ost_queue` A2 ON (A1.`parent_id` = A2.`id`) LEFT JOIN `ost_queue_sort` A3 ON (A1.`sort_id` = A3.`id`) WHERE (A1.`flags` & 2 != 0 OR A1.`staff_id` = 1) AND NOT A1.`flags` & 4 != 0 ORDER BY A1.`parent_id` ASC, `_sort` ASC, A1.`title` ASC;
# User@Host: root[root] @ localhost []
# Thread_id: 5 Schema: ostfm QC_hit: No
# Query_time: 0.000349 Lock_time: 0.000027 Rows_sent: 11 Rows_examined: 22
# Rows_affected: 0 Bytes_sent: 220
SET timestamp=1716470702;
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'ost_form_field' AND TABLE_SCHEMA = DATABASE() ORDER BY ORDINAL_POSITION;
# User@Host: root[root] @ localhost []
# Thread_id: 5 Schema: ostfm QC_hit: No
# Query_time: 0.000308 Lock_time: 0.000031 Rows_sent: 10 Rows_examined: 20
# Rows_affected: 0 Bytes_sent: 207
SET timestamp=1716470702;
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'ost_form' AND TABLE_SCHEMA = DATABASE() ORDER BY ORDINAL_POSITION;
# User@Host: root[root] @ localhost []
# Thread_id: 5 Schema: ostfm QC_hit: No
# Query_time: 0.000112 Lock_time: 0.000031 Rows_sent: 1 Rows_examined: 2
# Rows_affected: 0 Bytes_sent: 715
SET timestamp=1716470702;
SELECT A1.* FROM `ost_list` A1 ORDER BY A1.`name` ASC;
# User@Host: root[root] @ localhost []
# Thread_id: 5 Schema: ostfm QC_hit: No
# Query_time: 0.000281 Lock_time: 0.000025 Rows_sent: 4 Rows_examined: 8
# Rows_affected: 0 Bytes_sent: 152
SET timestamp=1716470702;
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'ost_form_entry_values' AND TABLE_SCHEMA = DATABASE() ORDER BY ORDINAL_POSITION;
# User@Host: root[root] @ localhost []
# Thread_id: 5 Schema: ostfm QC_hit: No
# Query_time: 0.000288 Lock_time: 0.000027 Rows_sent: 7 Rows_examined: 14
# Rows_affected: 0 Bytes_sent: 183
SET timestamp=1716470702;
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'ost_queue_columns' AND TABLE_SCHEMA = DATABASE() ORDER BY ORDINAL_POSITION;
# User@Host: root[root] @ localhost []
# Thread_id: 5 Schema: ostfm QC_hit: No
# Query_time: 0.000289 Lock_time: 0.000025 Rows_sent: 10 Rows_examined: 20
# Rows_affected: 0 Bytes_sent: 220
SET timestamp=1716470702;
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'ost_queue_column' AND TABLE_SCHEMA = DATABASE() ORDER BY ORDINAL_POSITION;
# User@Host: root[root] @ localhost []
# Thread_id: 5 Schema: ostfm QC_hit: No
# Query_time: 0.000328 Lock_time: 0.000089 Rows_sent: 24 Rows_examined: 93
# Rows_affected: 0 Bytes_sent: 8203
SET timestamp=1716470702;
SELECT A1.`id`, A1.`parent_id`, A1.`columns_id`, A1.`sort_id`, A1.`flags`, A1.`staff_id`, A1.`sort`, A1.`title`, A1.`config`, A1.`filter`, A1.`root`, A1.`path`, A1.`created`, A1.`updated`, CASE WHEN A1.`sort` = 0 THEN 999 ELSE A1.`sort` END AS `_sort`, A2.`id`, A2.`parent_id`, A2.`columns_id`, A2.`sort_id`, A2.`flags`, A2.`staff_id`, A2.`sort`, A2.`title`, A2.`config`, A2.`filter`, A2.`root`, A2.`path`, A2.`created`, A2.`updated`, A3.`id`, A3.`root`, A3.`name`, A3.`columns`, A3.`updated` FROM `ost_queue` A1 LEFT JOIN `ost_queue` A2 ON (A1.`parent_id` = A2.`id`) LEFT JOIN `ost_queue_sort` A3 ON (A1.`sort_id` = A3.`id`) WHERE (A1.`flags` & 2 != 0 OR A1.`staff_id` = 1) AND NOT A1.`flags` & 4 != 0 ORDER BY A1.`parent_id` ASC, `_sort` ASC, A1.`title` ASC;
# User@Host: root[root] @ localhost []
# Thread_id: 5 Schema: ostfm QC_hit: No
# Query_time: 0.000291 Lock_time: 0.000025 Rows_sent: 3 Rows_examined: 6
# Rows_affected: 0 Bytes_sent: 138
SET timestamp=1716470702;
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'ost_team_member' AND TABLE_SCHEMA = DATABASE() ORDER BY ORDINAL_POSITION;
# User@Host: root[root] @ localhost []
# Thread_id: 5 Schema: ostfm QC_hit: No
# Query_time: 0.000670 Lock_time: 0.000066 Rows_sent: 14 Rows_examined: 27
# Rows_affected: 0 Bytes_sent: 168
SET timestamp=1716470702;
SELECT DISTINCT d.id FROM ost_staff s LEFT JOIN ost_staff_dept_access g ON (s.staff_id=g.staff_id) INNER JOIN ost_department d ON (LOCATE(CONCAT("/", s.dept_id, "/"), d.path) OR d.manager_id=s.staff_id OR LOCATE(CONCAT("/", g.dept_id, "/"), d.path)) WHERE s.staff_id=1;
# User@Host: root[root] @ localhost []
# Thread_id: 5 Schema: ostfm QC_hit: No
# Query_time: 0.000255 Lock_time: 0.000046 Rows_sent: 24 Rows_examined: 93
# Rows_affected: 0 Bytes_sent: 8104
SET timestamp=1716470702;
SELECT A1.`id`, A1.`parent_id`, A1.`columns_id`, A1.`sort_id`, A1.`flags`, A1.`staff_id`, A1.`sort`, A1.`title`, A1.`config`, A1.`filter`, A1.`root`, A1.`path`, A1.`created`, A1.`updated`, A2.`id`, A2.`parent_id`, A2.`columns_id`, A2.`sort_id`, A2.`flags`, A2.`staff_id`, A2.`sort`, A2.`title`, A2.`config`, A2.`filter`, A2.`root`, A2.`path`, A2.`created`, A2.`updated`, A3.`id`, A3.`root`, A3.`name`, A3.`columns`, A3.`updated` FROM `ost_queue` A1 LEFT JOIN `ost_queue` A2 ON (A1.`parent_id` = A2.`id`) LEFT JOIN `ost_queue_sort` A3 ON (A1.`sort_id` = A3.`id`) WHERE (A1.`flags` & 2 != 0 OR A1.`staff_id` = 1) AND NOT A1.`flags` & 4 != 0 ORDER BY A1.`sort` ASC;
# Time: 240523 13:25:04
# User@Host: root[root] @ localhost []
# Thread_id: 5 Schema: ostfm QC_hit: No
# Query_time: 1.632606 Lock_time: 0.000635 Rows_sent: 1 Rows_examined: 195340
# Rows_affected: 0 Bytes_sent: 796
SET timestamp=1716470704;
SELECT COUNT(DISTINCT CASE WHEN A2.`state` = 'open' AND A2.`state` = 'open' AND A2.`state` = 'open' AND NOT A1.`dept_id` = 17 AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q15`, COUNT(DISTINCT CASE WHEN A1.`dept_id` = 17 THEN A1.`ticket_id` END) AS `q16`, COUNT(DISTINCT CASE WHEN A1.`dept_id` = 6 THEN A1.`ticket_id` END) AS `q17`, COUNT(DISTINCT CASE WHEN A1.`dept_id` = 17 THEN A1.`ticket_id` END) AS `q20`, COUNT(DISTINCT CASE WHEN A1.`dept_id` = 21 THEN A1.`ticket_id` END) AS `q21`, COUNT(DISTINCT CASE WHEN A1.`dept_id` IN (19, 20) THEN A1.`ticket_id` END) AS `q31`, COUNT(DISTINCT CASE WHEN A1.`dept_id` = 17 THEN A1.`ticket_id` END) AS `q33`, COUNT(DISTINCT CASE WHEN A1.`dept_id` = 4 THEN A1.`ticket_id` END) AS `q34`, COUNT(DISTINCT CASE WHEN A1.`dept_id` = 22 THEN A1.`ticket_id` END) AS `q45`, COUNT(DISTINCT CASE WHEN A1.`dept_id` = 15 THEN A1.`ticket_id` END) AS `q46`, COUNT(DISTINCT CASE WHEN A2.`state` = 'open' AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q1`, COUNT(DISTINCT CASE WHEN A2.`state` = 'open' AND A2.`state` = 'open' AND A1.`isanswered` = '0' AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q2`, COUNT(DISTINCT CASE WHEN (A1.`team_id` IN (1) OR A1.`staff_id` IN (1)) AND A2.`state` = 'open' AND (A1.`team_id` IN (1) OR A1.`staff_id` IN (1)) AND A2.`state` = 'open' AND A1.`staff_id` IN (1) AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q6`, COUNT(DISTINCT CASE WHEN A2.`state` = 'closed' AND A2.`state` = 'closed' AND A1.`closed` BETWEEN '2024-05-22 18:30:00' AND '2024-05-23 18:29:59' AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q9`, COUNT(DISTINCT CASE WHEN A2.`state` = 'open' AND A2.`state` = 'open' AND A1.`isanswered` = '1' AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q3`, COUNT(DISTINCT CASE WHEN (A1.`team_id` IN (1) OR A1.`staff_id` IN (1)) AND A2.`state` = 'open' AND (A1.`team_id` IN (1) OR A1.`staff_id` IN (1)) AND A2.`state` = 'open' AND NOT A1.`staff_id` IN (1) AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q7`, COUNT(DISTINCT CASE WHEN A2.`state` = 'closed' AND A2.`state` = 'closed' AND A1.`closed` BETWEEN '2024-05-21 18:30:00' AND '2024-05-22 18:29:59' AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q10`, COUNT(DISTINCT CASE WHEN A2.`state` = 'open' AND A2.`state` = 'open' AND A1.`isoverdue` = '1' AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q4`, COUNT(DISTINCT CASE WHEN (A1.`team_id` IN (1) OR A1.`staff_id` IN (1)) AND A2.`state` = 'open' AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q5`, COUNT(DISTINCT CASE WHEN A2.`state` = 'closed' AND A2.`state` = 'closed' AND A1.`closed` BETWEEN '2024-05-19 18:30:00' AND '2024-05-26 18:29:59' AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q11`, COUNT(DISTINCT CASE WHEN A2.`state` = 'closed' AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q8`, COUNT(DISTINCT CASE WHEN A2.`state` = 'closed' AND A2.`state` = 'closed' AND A1.`closed` BETWEEN '2024-04-30 18:30:00' AND '2024-05-31 18:29:59' AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q12`, COUNT(DISTINCT CASE WHEN A2.`state` = 'closed' AND A2.`state` = 'closed' AND A1.`closed` BETWEEN '2024-03-31 18:30:00' AND '2024-06-30 18:29:59' AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q13`, COUNT(DISTINCT CASE WHEN A2.`state` = 'closed' AND A2.`state` = 'closed' AND A1.`closed` BETWEEN '2023-12-31 18:30:00' AND '2024-12-31 18:29:59' AND A3.`object_type` = 'T' THEN A1.`ticket_id` END) AS `q14` FROM `ost_ticket` A1 JOIN `ost_ticket_status` A2 ON (A1.`status_id` = A2.`id`) LEFT JOIN `ost_thread` A3 ON (A3.`object_type` = 'T' AND A1.`ticket_id` = A3.`object_id`) LEFT JOIN `ost_thread_referral` A4 ON (A3.`id` = A4.`thread_id`) LEFT JOIN `ost_staff` A5 ON (A4.`object_type` = 'S' AND A4.`object_id` = A5.`staff_id`) LEFT JOIN `ost_thread` A6 ON (A1.`ticket_id` = A6.`object_id` AND A6.`object_type` = 'C') LEFT JOIN `ost_thread_referral` A7 ON (A6.`id` = A7.`thread_id`) LEFT JOIN `ost_staff` A8 ON (A7.`object_type` = 'S' AND A7.`object_id` = A8.`staff_id`) LEFT JOIN `ost_team` B0 ON (A4.`object_type` = 'E' AND A4.`object_id` = B0.`team_id`) LEFT JOIN `ost_team` B1 ON (A7.`object_type` = 'E' AND A7.`object_id` = B1.`team_id`) LEFT JOIN `ost_department` B2 ON (A4.`object_type` = 'D' AND A4.`object_id` = B2.`id`) LEFT JOIN `ost_department` B3 ON (A7.`object_type` = 'D' AND A7.`object_id` = B3.`id`) WHERE ((A2.`state` = 'open' AND (A1.`staff_id` = 1 OR A5.`staff_id` = 1 OR A6.`object_type` = 'C' AND A8.`staff_id` = 1 OR A1.`team_id` IN (1) OR B0.`team_id` IN (1) OR A6.`object_type` = 'C' AND B1.`team_id` IN (1))) OR (A2.`state` IN ('open', 'closed') AND (A1.`dept_id` IN (1, 4, 6, 14, 15, 17, 19, 20, 21, 22, 23, 26, 27, 28) OR B2.`id` IN (1, 4, 6, 14, 15, 17, 19, 20, 21, 22, 23, 26, 27, 28))) OR A6.`object_type` = 'C' AND B3.`id` IN (1, 4, 6, 14, 15, 17, 19, 20, 21, 22, 23, 26, 27, 28));
# User@Host: root[root] @ localhost []
# Thread_id: 5 Schema: ostfm QC_hit: No
# Query_time: 0.000951 Lock_time: 0.000238 Rows_sent: 4 Rows_examined: 8
# Rows_affected: 0 Bytes_sent: 146
SET timestamp=1716470704;
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'ost_queue_sorts' AND TABLE_SCHEMA = DATABASE() ORDER BY ORDINAL_POSITION;