This repository has been archived by the owner on Dec 13, 2022. It is now read-only.
Optimize logs table request #4633
Labels
kind/enhancement
status/implemented
status/in-backlog
A dev will begin to work on your modifications soon
Milestone
BUG REPORT INFORMATION
Centreon Web version: 2.7.6
Steps to reproduce the issue:
Describe the results you received:
It does following request (a full scan):
SELECT SQL_CALC_FOUND_ROWS DISTINCT logs.* FROM logs WHERE logs.ctime > '1466936710' AND (( (
msg_type
= '2' ANDstatus
IN ('0','1','2','3'))) OR ( ((msg_type
IN ('0', '10', '11') ANDstatus
IN ('0','1','2','3')) ) )) ANDmsg_type
NOT IN ('4','5') ORDER BY ctime DESC, host_name ASC, log_id DESC, service_description ASC LIMIT 0, 30;Describe the results you expected:
I think we can removed following order by 'host_name ASC, log_id DESC, service_description ASC'. time is enough.
The DISTINCT could be removed when we don't use ACL. DISTINCT has a purpose only with ACL stuffs.
Additional information you think important (e.g. issue happens only occasionally):
The text was updated successfully, but these errors were encountered: