Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 260654

The EXPLAIN statement can be used to obtain information about the database executes a statement.

1 vote
2 answers
341 views

How can I make queries on skewed datasets more performant on Postgres

Super slow query: EXPLAIN ANALYZE SELECT min(price) FROM PriceHistory WHERE productId = 'someId' Result (cost=555.25..555.26 rows=1 width=32) (actual time=100084.212..100084.213 rows=1 loops=1) InitPlan … NULL) Filter: ((productId)::text = 'someId'::text) Rows Removed by Filter: 1140612 Planning Time: 0.124 ms Execution Time: 100084.230 ms Fast-ish equivalent query that forces using a better index > EXPLAIN
Alessandro Jeanteur's user avatar