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 api_record_idx_created ON "api_record" ("created" desc);
CREATE INDEX api_items_idx_record_id ON "api_record_items" ("record_id");
SELECT
"api_item"."id",
"api_item"."details",
(SELECT
U0."status"
FROM
"api_record" U0
INNER JOIN
"api_record_items" U1
ON (
U0."id" = U1."record_id"
)
WHERE
(
U1."item_id" = (
"api_item"."id"
)
AND U0."system" = system_1
)
ORDER BY
U0."created" DESC LIMIT 1) AS "system_1_status"
FROM
"api_item"