explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LBv2 : sdfsdf

Settings
# exclusive inclusive rows x rows loops node
1. 2.778 21.993 ↓ 16.7 817 1

Sort (cost=529.53..529.65 rows=49 width=1,050) (actual time=21.729..21.993 rows=817 loops=1)

  • Sort Key: cs.appointment_date
  • Sort Method: quicksort Memory: 878kB
2. 1.455 19.215 ↓ 16.7 817 1

Nested Loop Left Join (cost=65.49..528.15 rows=49 width=1,050) (actual time=1.403..19.215 rows=817 loops=1)

  • Filter: ((cs.object_id IS NULL) OR ((mo.id IS NOT NULL) AND (mo.mo_contract_id = cntr.id)))
  • Rows Removed by Filter: 2
3. 1.469 14.484 ↓ 2.5 819 1

Hash Join (cost=65.20..381.79 rows=324 width=906) (actual time=1.381..14.484 rows=819 loops=1)

  • Hash Cond: (cs.service_id = s.id)
4. 5.592 12.916 ↓ 3.5 2,903 1

Hash Join (cost=60.26..370.48 rows=835 width=734) (actual time=0.950..12.916 rows=2,903 loops=1)

  • Hash Cond: (cs.contract_id = cntr.id)
5. 6.400 6.400 ↓ 1.1 5,656 1

Seq Scan on billing_customer_service cs (cost=0.00..282.20 rows=5,245 width=140) (actual time=0.013..6.400 rows=5,656 loops=1)

  • Filter: ((status_cs = 'A'::bpchar) AND (_status = 'A'::bpchar) AND ((now() < delete_date) OR (delete_date IS NULL)) AND (appointment_date <= now()))
  • Rows Removed by Filter: 1072
6. 0.076 0.924 ↓ 1.5 152 1

Hash (cost=58.96..58.96 rows=104 width=594) (actual time=0.924..0.924 rows=152 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 86kB
7. 0.848 0.848 ↓ 1.5 152 1

Seq Scan on uzgps_contract cntr (cost=0.00..58.96 rows=104 width=594) (actual time=0.021..0.848 rows=152 loops=1)

  • Filter: (((c_status)::text = 'A'::text) AND ((status_id = 2) OR ((status_id = 3) AND (date_trunc('month'::text, locked_date) = date_trunc('month'::text, now())))))
  • Rows Removed by Filter: 502
8. 0.016 0.099 ↓ 1.1 41 1

Hash (cost=4.47..4.47 rows=38 width=172) (actual time=0.099..0.099 rows=41 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 17kB
9. 0.083 0.083 ↓ 1.1 41 1

Seq Scan on billing_service s (cost=0.00..4.47 rows=38 width=172) (actual time=0.015..0.083 rows=41 loops=1)

  • Filter: ((_status = 'A'::bpchar) AND (service_type_id = 5))
  • Rows Removed by Filter: 57
10. 3.276 3.276 ↑ 1.0 1 819

Index Scan using uzgps_mobject_pkey on uzgps_mobject mo (cost=0.29..0.44 rows=1 width=136) (actual time=0.004..0.004 rows=1 loops=819)

  • Index Cond: (id = cs.object_id)
  • Filter: ((mo_status)::text = 'A'::text)
  • Rows Removed by Filter: 0
Planning time : 1.860 ms
Execution time : 24.035 ms