In case you have your own slow SQL query, you can optimize it automatically here.
For the query above, the following recommendations will be helpful as part of the SQL tuning process.
You'll find 3 sections below:
CREATE INDEX activitylog_idx_resource_method_timestamp ON "activitylog" ("resource","method","timestamp" desc);
CREATE EXTENSION pg_trgm;CREATE INDEX activitylog_idx_url ON "activitylog" USING GIN ("url" gin_trgm_ops);
SELECT
activitylog.id,
activitylog.url
FROM
activitylog
WHERE
activitylog.resource = 'jobs'
AND (
activitylog.method = 'saveTechStatus'
)
AND (
activitylog.url LIKE '%/jobs/saveTechStatus/81924/%'
)
ORDER BY
activitylog.timestamp DESC