Querying syslog table for particular day is very slow. how to make it fast?

Suggy
Giga Sage

I am querying syslog table for particular day like "created on 15th Feb AND message contains 'SLA Breached'"

Its taking min of 30s to show 200 records (overall 80k logs created on that day).

 

How to increase the search speed? How to know if any indexing is required or not? Displaying 200 records out of 80k records is not huge right?

 

5 REPLIES 5

sunil maddheshi
Tera Guru

@Suggy 

Try applying addEncodedQuery if you are using addQuery also put setLimit:

gr.setLimit(200);
gr.addEncodedQuery('sys_created_on>=2025-02-15^sys_created_on<2025-02-16^messageLIKEsla breached');

Please mark correct/helpful if this helps you!