All Questions
2 questions
1
vote
1
answer
220
views
Postgres v10 is not using the index in a subquery
I have a subquery that will return 3 records, to later add the result of some calculations (using some functions).
When I am running the full query, Postgres is calculating a high number of expected ...
1
vote
1
answer
969
views
Can't optimize a nested query using indexes
There are two tables containing hundreds of thousands of records: client and task. It's necessary to query the following:
SELECT
id,
(SELECT status
FROM task t
WHERE t.client_id = c.id AND ...