explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mQ6P : With index

Settings
# exclusive inclusive rows x rows loops node
1. 1.166 14,943.697 ↑ 1.0 100 1

Limit (cost=54,082.34..54,082.59 rows=100 width=390) (actual time=14,941.720..14,943.697 rows=100 loops=1)

2.          

Initplan (for Limit)

3. 0.020 0.020 ↓ 0.0 0 1

Seq Scan on card_analytics_stream_state (cost=0.00..30.40 rows=2,040 width=8) (actual time=0.014..0.020 rows=0 loops=1)

4. 0.000 0.000 ↓ 0.0 0

Seq Scan on card_analytics_stream_state card_analytics_stream_state_1 (cost=0.00..30.40 rows=2,040 width=8) (never executed)

5. 7,266.141 14,942.511 ↑ 134.7 100 1

Sort (cost=54,021.54..54,055.21 rows=13,467 width=390) (actual time=14,941.706..14,942.511 rows=100 loops=1)

  • Sort Key: analytics_event.created
  • Sort Method: top-N heapsort Memory: 128kB
6. 7,557.906 7,676.370 ↓ 74.3 1,000,010 1

Bitmap Heap Scan on analytics_event (cost=1,094.77..53,506.84 rows=13,467 width=390) (actual time=127.477..7,676.370 rows=1,000,010 loops=1)

  • Recheck Cond: ((payload ->> 'analyticsEvent'::text) = ANY ('{card-cancelled,card-dismissed,card-completed,card-snoozed,card-expired,card-displayed,card-voted-up,card-voted-down}'::text[]))
  • Filter: (($0 IS NULL) OR (created > $1))
  • Heap Blocks: exact=52,633
7. 118.464 118.464 ↓ 25.0 1,000,010 1

Bitmap Index Scan on analytics_event_payload_event (cost=0.00..1,091.40 rows=40,000 width=0) (actual time=118.459..118.464 rows=1,000,010 loops=1)

  • Index Cond: ((payload ->> 'analyticsEvent'::text) = ANY ('{card-cancelled,card-dismissed,card-completed,card-snoozed,card-expired,card-displayed,card-voted-up,card-voted-down}'::text[]))
Planning time : 0.206 ms
Execution time : 14,945.264 ms