Answer the question
In order to leave comments, you need to log in
How to create indexes correctly?
Good afternoon
There is a large table on which frequent sampling should be made
Table structure:
id, parent_id, custom_name, released_at, ....
And the query:
select *
from cards
where ("parent_id" is null or "custom_name" is not null or " released_at" > now()) and ...
Did explain as requested and there:
-> Seq Scan on cards (cost=0.00..233142.26 rows=325284 width=8)
Filter: ((parent_id IS NULL) OR (custom_lang IS NOT NULL) OR (released_at > now()))
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question