explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fk9a

Settings
# exclusive inclusive rows x rows loops node
1. 0.046 0.982 ↓ 44.0 44 1

Sort (cost=734.80..734.80 rows=1 width=328) (actual time=0.980..0.982 rows=44 loops=1)

  • Sort Key: rs.rs_time
  • Sort Method: quicksort Memory: 36kB
2. 0.013 0.936 ↓ 44.0 44 1

Nested Loop Left Join (cost=1.28..734.79 rows=1 width=328) (actual time=0.213..0.936 rows=44 loops=1)

3. 0.043 0.659 ↓ 44.0 44 1

Nested Loop (cost=1.28..727.38 rows=1 width=212) (actual time=0.171..0.659 rows=44 loops=1)

4. 0.010 0.572 ↓ 44.0 44 1

Nested Loop (cost=0.99..725.94 rows=1 width=208) (actual time=0.158..0.572 rows=44 loops=1)

5. 0.024 0.474 ↓ 44.0 44 1

Nested Loop (cost=0.71..723.34 rows=1 width=193) (actual time=0.144..0.474 rows=44 loops=1)

6. 0.017 0.318 ↓ 44.0 44 1

Nested Loop (cost=0.28..720.59 rows=1 width=185) (actual time=0.126..0.318 rows=44 loops=1)

7. 0.185 0.213 ↓ 11.0 44 1

Append (cost=0.00..710.12 rows=4 width=169) (actual time=0.102..0.213 rows=44 loops=1)

  • -> Index Scan using receiptsale_9_2016_fk_receipt_idx on receiptsale_9_2016 rs_2 (cost=0.56..379.81 rows=1 width=116) (actual time=0.051..0.051 ro
  • -> Index Scan using receiptsale_9_2017_fk_receipt_idx on receiptsale_9_2017 rs_3 (cost=0.56..328.55 rows=1 width=115) (actual time=0.022..0.128 ro
8. 0.013 0.013 ↓ 0.0 0 1

Seq Scan on receiptsale rs (cost=0.00..0.00 rows=1 width=328) (actual time=0.013..0.013 rows=0 loops=1)

  • Filter: ((discountcode IS NULL) AND (NOT deleted) AND (rs_time >= '2016-12-20 07:39:00'::timestamp without time zone) AND (rs_time <= '2017-01
9. 0.015 0.015 ↓ 0.0 0 1

Seq Scan on receiptsale_9 rs_1 (cost=0.00..1.56 rows=1 width=117) (actual time=0.015..0.015 rows=0 loops=1)

  • Filter: ((discountcode IS NULL) AND (NOT deleted) AND (rs_time >= '2016-12-20 07:39:00'::timestamp without time zone) AND (rs_time <= '2017-01
  • Rows Removed by Filter: 4
  • Index Cond: (fk_receipt = ANY ('{3179405632,3179406915,3179404325,3179407207,3179405639,3179408966,3179408971,3179407212,3179410191,3179411952
  • Filter: ((discountcode IS NULL) AND (NOT deleted) AND (rs_time >= '2016-12-20 07:39:00'::timestamp without time zone) AND (rs_time <= '2017-01
  • Index Cond: (fk_receipt = ANY ('{3179405632,3179406915,3179404325,3179407207,3179405639,3179408966,3179408971,3179407212,3179410191,3179411952
  • Filter: ((discountcode IS NULL) AND (NOT deleted) AND (rs_time >= '2016-12-20 07:39:00'::timestamp without time zone) AND (rs_time <= '2017-01
  • Rows Removed by Filter: 4
10. 0.088 0.088 ↑ 1.0 1 44

Index Scan using operationalunit_pkey on operationalunit ou (cost=0.28..2.59 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=44)

  • Index Cond: (id = rs.fk_operationalunit)
  • Filter: (fk_client = 1634005599)
11. 0.132 0.132 ↑ 1.0 1 44

Index Scan using salearticle_pkey on salearticle sa (cost=0.42..2.74 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=44)

  • Index Cond: (id = rs.fk_salearticle)
  • Filter: (fk_client = 1634005599)
12. 0.088 0.088 ↑ 1.0 1 44

Index Scan using articlegroup_pkey on articlegroup ag (cost=0.29..2.60 rows=1 width=31) (actual time=0.002..0.002 rows=1 loops=44)

  • Index Cond: (id = rs.fk_articlegroup)
13. 0.044 0.044 ↑ 1.0 1 44

Index Scan using maingroup_pkey on maingroup mg (cost=0.29..1.44 rows=1 width=20) (actual time=0.001..0.001 rows=1 loops=44)

  • Index Cond: (id = ag.fk_maingroup)
14. 0.264 0.264 ↓ 0.0 0 44

Append (cost=0.00..7.00 rows=4 width=124) (actual time=0.006..0.006 rows=0 loops=44)

  • -> Index Scan using receiptaction_9_2016_fk_receipt_idx on receiptaction_9_2016 rowcommentra_2 (cost=0.43..3.42 rows=1 width=188) (actual time=0.002..0.002 rows=0 loops=4
  • -> Index Scan using receiptaction_9_2017_fk_receipt_idx on receiptaction_9_2017 rowcommentra_3 (cost=0.43..3.38 rows=1 width=212) (actual time=0.002..0.002 rows=0 loops=4
15. 0.000 0.000 ↓ 0.0 0 44

Seq Scan on receiptaction rowcommentra (cost=0.00..0.00 rows=1 width=48) (actual time=0.000..0.000 rows=0 loops=44)

  • Filter: ((r_time >= '2016-12-20 07:39:00'::timestamp without time zone) AND (r_time <= '2017-01-30 07:59:59'::timestamp without time zone) AND (fk_client = 1634005599
16. 0.000 0.000 ↓ 0.0 0 44

Seq Scan on receiptaction_9 rowcommentra_1 (cost=0.00..0.00 rows=1 width=48) (actual time=0.000..0.000 rows=0 loops=44)

  • Filter: ((r_time >= '2016-12-20 07:39:00'::timestamp without time zone) AND (r_time <= '2017-01-30 07:59:59'::timestamp without time zone) AND (fk_client = 1634005599
  • Index Cond: (fk_receipt = rs.fk_receipt)
  • Filter: ((r_time >= '2016-12-20 07:39:00'::timestamp without time zone) AND (r_time <= '2017-01-30 07:59:59'::timestamp without time zone) AND (fk_client = 1634005599
  • Index Cond: (fk_receipt = rs.fk_receipt)
  • Filter: ((r_time >= '2016-12-20 07:39:00'::timestamp without time zone) AND (r_time <= '2017-01-30 07:59:59'::timestamp without time zone) AND (fk_client = 1634005599
  • Rows Removed by Filter: 0
Planning time : 36.977 ms
Execution time : 1.276 ms