explain.depesz.com

A tool for finding a real cause for slow queries.

Result: LVW

options
exclusive inclusive rows x rows loops node
0.000 0.000 ↓ 0.0

Sort (cost=2871.45..2871.51 rows=25 width=209) (actual time=.. rows= loops=)

  • Sort Key: "*SELECT* 1".taxdate, "*SELECT* 1".reference, "*SELECT* 1".description
0.000 0.000 ↓ 0.0

Append (cost=5.84..2870.62 rows=25 width=71) (actual time=.. rows= loops=)

0.000 0.000 ↓ 0.0

Subquery Scan "*SELECT* 1" (cost=5.84..861.10 rows=8 width=54) (actual time=.. rows= loops=)

0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=5.84..861.02 rows=8 width=54) (actual time=.. rows= loops=)

0.000 0.000 ↓ 0.0

Nested Loop (cost=5.84..801.88 rows=8 width=48) (actual time=.. rows= loops=)

0.000 0.000 ↓ 0.0

Index Scan using chart_id_key on chart ch (cost=0.00..8.27 rows=1 width=4) (actual time=.. rows= loops=)

  • Index Cond: (id = 39878)
0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=5.84..793.53 rows=8 width=52) (actual time=.. rows= loops=)

0.000 0.000 ↓ 0.0

Nested Loop (cost=5.84..785.96 rows=8 width=56) (actual time=.. rows= loops=)

0.000 0.000 ↓ 0.0

Bitmap Heap Scan on acc_trans ac (cost=5.84..648.89 rows=18 width=37) (actual time=.. rows= loops=)

  • Recheck Cond: (chart_id = 39878)
  • Filter: (approved AND (taxdate >= '2011-01-01'::date) AND (taxdate <= '2011-01-31'::date))
0.000 0.000 ↓ 0.0

Bitmap Index Scan on acc_trans_chart_id_key (cost=0.00..5.83 rows=208 width=0) (actual time=.. rows= loops=)

  • Index Cond: (chart_id = 39878)
0.000 0.000 ↓ 0.0

Index Scan using gl_id_key on gl a (cost=0.00..7.60 rows=1 width=23) (actual time=.. rows= loops=)

  • Index Cond: (a.id = ac.trans_id)
0.000 0.000 ↓ 0.0

Index Scan using department_id_key on department d (cost=0.00..0.93 rows=1 width=4) (actual time=.. rows= loops=)

  • Index Cond: (d.id = ac.department_id)
0.000 0.000 ↓ 0.0

Index Scan using ward_project_ward_project_i_key on ward_project wp (cost=0.00..7.38 rows=1 width=14) (actual time=.. rows= loops=)

  • Index Cond: (wp.ward_project_id = ac.project_id)
0.000 0.000 ↓ 0.0

Subquery Scan "*SELECT* 2" (cost=5.84..992.37 rows=8 width=75) (actual time=.. rows= loops=)

0.000 0.000 ↓ 0.0

Nested Loop (cost=5.84..992.29 rows=8 width=75) (actual time=.. rows= loops=)

0.000 0.000 ↓ 0.0

Index Scan using chart_id_key on chart ch (cost=0.00..8.27 rows=1 width=4) (actual time=.. rows= loops=)

  • Index Cond: (id = 39878)
0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=5.84..983.94 rows=8 width=79) (actual time=.. rows= loops=)

0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=5.84..981.70 rows=8 width=83) (actual time=.. rows= loops=)

  • Join Filter: (i.trans_id = ac.trans_id)
0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=5.84..917.18 rows=8 width=87) (actual time=.. rows= loops=)

0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=5.84..858.04 rows=8 width=81) (actual time=.. rows= loops=)

0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=5.84..850.46 rows=8 width=85) (actual time=.. rows= loops=)

0.000 0.000 ↓ 0.0

Nested Loop (cost=5.84..785.96 rows=8 width=66) (actual time=.. rows= loops=)

0.000 0.000 ↓ 0.0

Bitmap Heap Scan on acc_trans ac (cost=5.84..648.89 rows=18 width=41) (actual time=.. rows= loops=)

  • Recheck Cond: (chart_id = 39878)
  • Filter: (approved AND (taxdate >= '2011-01-01'::date) AND (taxdate <= '2011-01-31'::date))
0.000 0.000 ↓ 0.0

Bitmap Index Scan on acc_trans_chart_id_key (cost=0.00..5.83 rows=208 width=0) (actual time=.. rows= loops=)

  • Index Cond: (chart_id = 39878)
0.000 0.000 ↓ 0.0

Index Scan using ar_id_key on ar a (cost=0.00..7.60 rows=1 width=25) (actual time=.. rows= loops=)

  • Index Cond: (a.id = ac.trans_id)
0.000 0.000 ↓ 0.0

Index Scan using invoice_pkey on invoice ii (cost=0.00..8.05 rows=1 width=23) (actual time=.. rows= loops=)

  • Index Cond: (ac.id = ii.id)
0.000 0.000 ↓ 0.0

Index Scan using department_id_key on department d (cost=0.00..0.93 rows=1 width=4) (actual time=.. rows= loops=)

  • Index Cond: (d.id = ac.department_id)
0.000 0.000 ↓ 0.0

Index Scan using ward_project_ward_project_i_key on ward_project wp (cost=0.00..7.38 rows=1 width=14) (actual time=.. rows= loops=)

  • Index Cond: (wp.ward_project_id = ac.project_id)
0.000 0.000 ↓ 0.0

Index Scan using invoice_pkey on invoice i (cost=0.00..8.05 rows=1 width=12) (actual time=.. rows= loops=)

  • Index Cond: (i.id = ac.id)
0.000 0.000 ↓ 0.0

Index Scan using department_id_key on department d2 (cost=0.00..0.27 rows=1 width=4) (actual time=.. rows= loops=)

  • Index Cond: (d2.id = i.department_id)
0.000 0.000 ↓ 0.0

Subquery Scan "*SELECT* 3" (cost=5.84..1017.14 rows=9 width=82) (actual time=.. rows= loops=)

0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=5.84..1017.05 rows=9 width=82) (actual time=.. rows= loops=)

0.000 0.000 ↓ 0.0

Nested Loop (cost=5.84..950.52 rows=9 width=76) (actual time=.. rows= loops=)

0.000 0.000 ↓ 0.0

Index Scan using chart_id_key on chart ch (cost=0.00..8.27 rows=1 width=4) (actual time=.. rows= loops=)

  • Index Cond: (id = 39878)
0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=5.84..942.17 rows=9 width=80) (actual time=.. rows= loops=)

0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=5.84..939.64 rows=9 width=84) (actual time=.. rows= loops=)

  • Join Filter: (i.trans_id = ac.trans_id)
0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=5.84..867.05 rows=9 width=88) (actual time=.. rows= loops=)

0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=5.84..858.53 rows=9 width=92) (actual time=.. rows= loops=)

0.000 0.000 ↓ 0.0

Nested Loop (cost=5.84..785.96 rows=9 width=73) (actual time=.. rows= loops=)

0.000 0.000 ↓ 0.0

Bitmap Heap Scan on acc_trans ac (cost=5.84..648.89 rows=18 width=41) (actual time=.. rows= loops=)

  • Recheck Cond: (chart_id = 39878)
  • Filter: (approved AND (taxdate >= '2011-01-01'::date) AND (taxdate <= '2011-01-31'::date))
0.000 0.000 ↓ 0.0

Bitmap Index Scan on acc_trans_chart_id_key (cost=0.00..5.83 rows=208 width=0) (actual time=.. rows= loops=)

  • Index Cond: (chart_id = 39878)
0.000 0.000 ↓ 0.0

Index Scan using ap_id_key on ap a (cost=0.00..7.60 rows=1 width=32) (actual time=.. rows= loops=)

  • Index Cond: (a.id = ac.trans_id)
0.000 0.000 ↓ 0.0

Index Scan using invoice_pkey on invoice ii (cost=0.00..8.05 rows=1 width=23) (actual time=.. rows= loops=)

  • Index Cond: (ac.id = ii.id)
0.000 0.000 ↓ 0.0

Index Scan using department_id_key on department d (cost=0.00..0.93 rows=1 width=4) (actual time=.. rows= loops=)

  • Index Cond: (d.id = ac.department_id)
0.000 0.000 ↓ 0.0

Index Scan using invoice_pkey on invoice i (cost=0.00..8.05 rows=1 width=12) (actual time=.. rows= loops=)

  • Index Cond: (i.id = ac.id)
0.000 0.000 ↓ 0.0

Index Scan using department_id_key on department d2 (cost=0.00..0.27 rows=1 width=4) (actual time=.. rows= loops=)

  • Index Cond: (d2.id = i.department_id)
0.000 0.000 ↓ 0.0

Index Scan using ward_project_ward_project_i_key on ward_project wp (cost=0.00..7.38 rows=1 width=14) (actual time=.. rows= loops=)

  • Index Cond: (wp.ward_project_id = ac.project_id)