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 databaseone_idx_id ON "databaseone" ("id");
CREATE INDEX databasetwo_idx_item_id ON "databasetwo" ("item_id");
SELECT
databaseone.*,
COUNT(databasetwo) AS total_items
FROM
databaseone
LEFT JOIN
databasetwo
ON (
databaseone.id = databasetwo.item_id
)
GROUP BY
databaseone.id
ORDER BY
databaseone.id ASC