explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BAtQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.009 ↓ 0.0 0 1

Limit (cost=0.44..9,120.02 rows=101 width=451) (actual time=0.008..0.009 rows=0 loops=1)

2. 0.000 0.008 ↓ 0.0 0 1

Nested Loop (cost=0.44..17,065.79 rows=189 width=451) (actual time=0.008..0.008 rows=0 loops=1)

3. 0.001 0.008 ↓ 0.0 0 1

Nested Loop (cost=0.15..11,258.17 rows=189 width=395) (actual time=0.007..0.008 rows=0 loops=1)

4. 0.000 0.007 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.15..19.69 rows=1 width=387) (actual time=0.007..0.007 rows=0 loops=1)

  • Join Filter: (tr.uid_user = "user".uid)
5. 0.000 0.007 ↓ 0.0 0 1

Merge Append (cost=0.15..8.28 rows=1 width=149) (actual time=0.007..0.007 rows=0 loops=1)

  • Sort Key: tr.starts_at DESC
6. 0.007 0.007 ↓ 0.0 0 1

Index Scan Backward using transaction_default_state_starts_at_idx on transaction_default tr (cost=0.14..8.26 rows=1 width=149) (actual time=0.007..0.007 rows=0 loops=1)

  • Index Cond: ((state = 'SUCCESS'::text) AND (starts_at >= '2019-08-13 02:00:00+00'::timestamp with time zone) AND (starts_at < '2019-08-14 01:59:59+00'::timestamp with time zone))
  • Filter: ((id_theater = 'W8010'::text) AND (id_theater = ANY ('{P0703,P5044,W8010,P0993,P0096,W8330,P3829,P0925,P0664,P1133,P5756,P0160,P3000,B0261,P7963,P6940,P9556,P0146,W0681,P0761,W6423,P1093,P0867,P0151,P0948,P0133,P0134,P0217,P1016,P5505,B0059,B9114,P0692,P8418,P1038,P0331,P0194,P8517,P0619,W3300,P6310,B0121,P0983,P0995,P0221,P4093,P9520,W0310,P0798,P0508,W1200,P0704,P5823,W6300,P0629,P0252,P0198,P0485,W6500,W8101,P5869,P0905,W4100,W1312,W7519,P0743,P8100,P4956,P0736,P0395,W8624,P0199}'::text[])))
7. 0.000 0.000 ↓ 0.0 0

Seq Scan on "user" (cost=0.00..8.96 rows=196 width=238) (never executed)

8. 0.000 0.000 ↓ 0.0 0

Seq Scan on theater th (cost=0.00..11,236.59 rows=189 width=14) (never executed)

  • Filter: ((id)::text = 'W8010'::text)
9. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_pkey on company (cost=0.29..3.33 rows=1 width=8) (never executed)

  • Index Cond: (id = th.id_company)
  • Heap Fetches: 0
10.          

SubPlan (for Nested Loop)

11. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=17.85..17.86 rows=1 width=8) (never executed)

12. 0.000 0.000 ↓ 0.0 0

Append (cost=0.15..17.84 rows=2 width=0) (never executed)

13. 0.000 0.000 ↓ 0.0 0

Index Only Scan using detail_concession_uid_transaction_type_idx on detail_concession (cost=0.15..8.33 rows=1 width=0) (never executed)

  • Index Cond: ((uid_transaction = tr.uid) AND (type = ANY ('{CONCESSION,OTHER}'::text[])))
  • Heap Fetches: 0
14. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on detail_other (cost=4.16..9.51 rows=1 width=0) (never executed)

  • Recheck Cond: (uid_transaction = tr.uid)
  • Filter: (type = ANY ('{CONCESSION,OTHER}'::text[]))
15. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on detail_other_uid_transaction_type_idx (cost=0.00..4.16 rows=2 width=0) (never executed)

  • Index Cond: (uid_transaction = tr.uid)
16. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=9.52..9.53 rows=1 width=32) (never executed)

17. 0.000 0.000 ↓ 0.0 0

Append (cost=4.16..9.51 rows=2 width=8) (never executed)

18. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on showtime_default (cost=4.16..9.50 rows=2 width=8) (never executed)

  • Recheck Cond: (uid_transaction = tr.uid)
  • Filter: (id_movie IS NOT NULL)
19. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on showtime_default_uid_transaction_idx (cost=0.00..4.16 rows=2 width=0) (never executed)

  • Index Cond: (uid_transaction = tr.uid)
Planning time : 2.210 ms