explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FAQW

Settings
# exclusive inclusive rows x rows loops node
1. 0.014 3,475.083 ↓ 0.0 1 1

Aggregate (cost=0.00..0.00 rows=0 width=0) (actual time=3,475.083..3,475.083 rows=1 loops=1)

  • Filter: (COALESCE((pg_catalog.sum(remote_scan.worker_column_3))::bigint, '0'::bigint) > 0)
2. 3,149.383 3,475.069 ↓ 0.0 32 1

Custom Scan (Citus Real-Time) (cost=0.00..0.00 rows=0 width=0) (actual time=3,475.067..3,475.069 rows=32 loops=1)

  • Task Count: 32
  • Tasks Shown: One of 32
  • -> Task
  • Node: host=ec2-13-56-9-200.us-west-1.compute.amazonaws.com port=5432 dbname=citus
  • Planning time: 14.420 ms
  • Execution time: 325.983 ms
3. 0.006 325.686 ↑ 1.0 1 1

Aggregate (cost=4,410.14..4,410.15 rows=1 width=24) (actual time=325.686..325.686 rows=1 loops=1)

  • Buffers: shared hit=464716
4. 0.058 325.680 ↓ 12.0 12 1

GroupAggregate (cost=4,410.05..4,410.13 rows=1 width=148) (actual time=325.651..325.680 rows=12 loops=1)

  • Group Key: e.event_datetime, t.event_id, e.event_name, i.invoice_id, cb.client_broker_company_name, v.name, t."row", t.section, rtgc.ticket_group_code_desc_long, rcbb.company_name
  • Buffers: shared hit=464716
5. 0.075 325.622 ↓ 28.0 28 1

Sort (cost=4,410.05..4,410.06 rows=1 width=151) (actual time=325.620..325.622 rows=28 loops=1)

  • Sort Key: e.event_datetime, t.event_id, e.event_name, i.invoice_id, cb.client_broker_company_name, v.name, t."row", t.section, rtgc.ticket_group_code_desc_long, rcbb.company_name
  • Sort Method: quicksort Memory: 32kB
  • Buffers: shared hit=464716
6. 0.035 325.547 ↓ 28.0 28 1

Nested Loop (cost=1,036.61..4,410.04 rows=1 width=151) (actual time=233.260..325.547 rows=28 loops=1)

  • Join Filter: (tgc.ticket_group_code_id = rtgc.ticket_group_code_id)
  • Buffers: shared hit=464716
7. 0.028 325.484 ↓ 28.0 28 1

Nested Loop (cost=1,036.47..4,409.87 rows=1 width=145) (actual time=233.251..325.484 rows=28 loops=1)

  • Join Filter: (tg.event_id = rt.event_id)
  • Buffers: shared hit=464660
8. 0.027 325.372 ↓ 28.0 28 1

Nested Loop (cost=1,036.18..4,409.52 rows=1 width=146) (actual time=233.236..325.372 rows=28 loops=1)

  • Buffers: shared hit=464576
9. 0.024 325.289 ↓ 28.0 28 1

Nested Loop (cost=1,035.89..4,408.46 rows=1 width=127) (actual time=233.223..325.289 rows=28 loops=1)

  • Buffers: shared hit=464492
10. 0.023 325.209 ↓ 28.0 28 1

Nested Loop (cost=1,035.61..4,408.16 rows=1 width=77) (actual time=233.208..325.209 rows=28 loops=1)

  • Buffers: shared hit=464408
11. 0.021 325.130 ↓ 28.0 28 1

Nested Loop (cost=1,035.33..4,407.86 rows=1 width=85) (actual time=233.194..325.130 rows=28 loops=1)

  • Buffers: shared hit=464324
12. 0.104 325.053 ↓ 28.0 28 1

Nested Loop (cost=1,035.05..4,407.57 rows=1 width=62) (actual time=233.182..325.053 rows=28 loops=1)

  • Buffers: shared hit=464240
  • -> Index Only Scan using purchase_order_pkey_122291 on purchase_order_122291 rpo (cost=0.42..0.46 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=
13. 0.099 324.949 ↓ 28.0 28 1

Nested Loop (cost=1,034.63..4,407.11 rows=1 width=70) (actual time=233.160..324.949 rows=28 loops=1)

  • Buffers: shared hit=464128
  • -> Index Scan using purchase_order_pkey_122290 on purchase_order_122290 po (cost=0.42..0.49 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=
  • Index Cond: (purchase_order_id = po.purchase_order_id)
  • Heap Fetches: 28
  • Buffers: shared hit=112
14. 0.089 324.850 ↓ 28.0 28 1

Nested Loop (cost=1,034.22..4,406.62 rows=1 width=62) (actual time=233.148..324.850 rows=28 loops=1)

  • Buffers: shared hit=464016
  • -> Index Scan using client_broker_pkey_122286 on client_broker_122286 cb (cost=0.28..0.30 rows=1 width=23) (actual time=0.002..0.002 rows=1 l
  • Index Cond: (purchase_order_id = t.purchase_order_id)
  • Buffers: shared hit=112
15. 133.449 324.761 ↓ 28.0 28 1

Nested Loop (cost=1,033.94..4,406.32 rows=1 width=47) (actual time=233.128..324.761 rows=28 loops=1)

  • Join Filter: (t.invoice_id = i.invoice_id)
  • Buffers: shared hit=463932
  • -> Index Scan using invoice_pkey_122282 on invoice_122282 i (cost=0.42..0.52 rows=1 width=12) (actual time=0.002..0.002 rows=0 loops=64
  • Index Cond: (client_broker_id = cbi.client_broker_id)
  • Buffers: shared hit=84
16. 119.176 191.312 ↓ 232.2 64,783 1

Nested Loop (cost=1,033.51..4,259.03 rows=279 width=43) (actual time=14.828..191.312 rows=64,783 loops=1)

  • Buffers: shared hit=203471
  • -> Index Only Scan using client_broker_invoice_pkey_122365 on client_broker_invoice_122365 cbi (cost=0.42..0.53 rows=1 width=8) (
  • Index Cond: (invoice_id = cbi.invoice_id)
  • Filter: (date(create_date) = '2019-03-10'::date)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=260461
17. 16.874 72.136 ↓ 242.6 72,306 1

Hash Join (cost=1,033.09..4,099.39 rows=298 width=35) (actual time=14.624..72.136 rows=72,306 loops=1)

  • Hash Cond: (tg.ticket_group_code_id = tgc.ticket_group_code_id)
  • Buffers: shared hit=2239
  • Index Cond: (invoice_id = t.invoice_id)
  • Heap Fetches: 9
  • Buffers: shared hit=201232
18. 37.259 55.235 ↓ 231.6 91,934 1

Hash Join (cost=1,030.75..4,092.58 rows=397 width=31) (actual time=9.032..55.235 rows=91,934 loops=1)

  • Hash Cond: ((t.ticket_group_id = tg.ticket_group_id) AND (t.event_id = tg.event_id))
  • Buffers: shared hit=2238
19. 9.086 9.086 ↑ 1.0 91,934 1

Seq Scan on ticket_121671 t (cost=0.00..2,578.89 rows=91,989 width=27) (actual time=0.003..9.086 rows=91,934 loops=1)

  • Buffers: shared hit=1659
20. 8.890 8.890 ↑ 1.0 18,070 1

Hash (cost=759.70..759.70 rows=18,070 width=12) (actual time=8.890..8.890 rows=18,070 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1016kB
  • Buffers: shared hit=579
  • -> Seq Scan on ticket_group_121767 tg (cost=0.00..759.70 rows=18070 width=12) (actual time=0.003..5.572 rows=18
  • Buffers: shared hit=579
21. 0.027 0.027 ↑ 1.0 53 1

Hash (cost=1.68..1.68 rows=53 width=4) (actual time=0.027..0.027 rows=53 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
  • Buffers: shared hit=1
  • -> Seq Scan on ticket_group_code_122288 tgc (cost=0.00..1.68 rows=53 width=4) (actual time=0.007..0.015 rows=53 loops
  • Filter: ((ticket_group_code_desc)::text !~~ 'ACT'::text)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=1
22. 0.056 0.056 ↑ 1.0 1 28

Index Scan using client_broker_pkey_122287 on client_broker_122287 rcbb (cost=0.28..0.30 rows=1 width=23) (actual time=0.002..0.002 rows=1 loops=28)

  • Index Cond: (client_broker_id = po.buyer_broker_id)
  • Buffers: shared hit=84
23. 0.056 0.056 ↑ 1.0 1 28

Index Only Scan using client_broker_pkey_122286 on client_broker_122286 cbb (cost=0.28..0.30 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=28)

  • Index Cond: (client_broker_id = po.buyer_broker_id)
  • Heap Fetches: 28
  • Buffers: shared hit=84
24. 0.056 0.056 ↑ 1.0 1 28

Index Scan using event_pkey_121863 on event_121863 e (cost=0.28..0.30 rows=1 width=50) (actual time=0.002..0.002 rows=1 loops=28)

  • Index Cond: (event_id = tg.event_id)
  • Buffers: shared hit=84
25. 0.056 0.056 ↑ 1.0 1 28

Index Scan using venue_pkey_122326 on venue_122326 v (cost=0.29..1.05 rows=1 width=27) (actual time=0.002..0.002 rows=1 loops=28)

  • Index Cond: (venue_id = e.venue_id)
  • Buffers: shared hit=84
26. 0.084 0.084 ↑ 1.0 1 28

Index Scan using ticket_pkey_121703 on ticket_121703 rt (cost=0.29..0.35 rows=1 width=19) (actual time=0.003..0.003 rows=1 loops=28)

  • Index Cond: ((ticket_id = t.ticket_id) AND (event_id = t.event_id))
  • Filter: (NOT expired)
  • Buffers: shared hit=84
27. 0.028 0.028 ↑ 1.0 1 28

Index Scan using ticket_group_code_pkey_122289 on ticket_group_code_122289 rtgc (cost=0.14..0.16 rows=1 width=18) (actual time=0.001..0.001 rows=1 loops=28)

  • Index Cond: (ticket_group_code_id = tg.ticket_group_code_id)
  • Buffers: shared hit=56