Actions
Architecture #17927
opensearch on event log is quite slow
Pull Request:
Effort required:
Name check:
To do
Fix check:
To do
Regression:
Description
I'm having a lot of event logs in my system (130k) and when i do a search in eveng, it can take up to a minute
It is not waiting for the user to finish to type, so it does query with Pol, Poli, Polic and Policy - there should be a higher timeout
Then searching does 2 query:
SELECT count(*) from ( select eventtype, id, modificationid, principal, creationdate, causeid, severity, reason, data, UNNEST(xpath('string(//entry)',data))::text as filter from eventlog) as temp1 where temp1.filter like '%Policy%'
and
select eventtype, id, modificationid, principal, creationdate, causeid, severity, reason, data from ( select eventtype, id, modificationid, principal, creationdate, causeid, severity, reason, data, UNNEST(xpath('string(//entry)',data))::text as filter from eventlog) as temp1 where temp1.filter like '%Polic%' order by id desc offset 0 limit 25
The count query could be smaller
SELECT count(*) from ( select id, UNNEST(xpath('string(//entry)',data))::text as filter from eventlog) as temp1 where temp1.filter like '%Policy%'
would return the same result, with less moving around of data
Actions