explain.depesz.com

PostgreSQL's explain analyze made readable

Result: K73M

Settings
# exclusive inclusive rows x rows loops node
1. 0.047 0.934 ↓ 41.0 41 1

Sort (cost=705.22..705.23 rows=1 width=328) (actual time=0.932..0.934 rows=41 loops=1)

  • Sort Key: rs.rs_time
  • Sort Method: quicksort Memory: 35kB
2. 0.015 0.887 ↓ 41.0 41 1

Nested Loop Left Join (cost=1.28..705.21 rows=1 width=328) (actual time=0.207..0.887 rows=41 loops=1)

3. 0.010 0.626 ↓ 41.0 41 1

Nested Loop (cost=1.28..697.81 rows=1 width=212) (actual time=0.167..0.626 rows=41 loops=1)

4. 0.010 0.534 ↓ 41.0 41 1

Nested Loop (cost=0.99..694.83 rows=1 width=208) (actual time=0.147..0.534 rows=41 loops=1)

5. 0.026 0.442 ↓ 41.0 41 1

Nested Loop (cost=0.71..691.93 rows=1 width=193) (actual time=0.134..0.442 rows=41 loops=1)

6. 0.014 0.293 ↓ 41.0 41 1

Nested Loop (cost=0.28..689.17 rows=1 width=185) (actual time=0.119..0.293 rows=41 loops=1)

7. 0.168 0.197 ↓ 10.2 41 1

Append (cost=0.00..678.71 rows=4 width=169) (actual time=0.103..0.197 rows=41 loops=1)

  • -> Index Scan using receiptsale_9_2016_fk_receipt_idx on receiptsale_9_2016 rs_2 (cost=0.56..363.14 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..313.80 rows=1 width=115) (actual time=0.022..0.112 ro
8. 0.014 0.014 ↓ 0.0 0 1

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

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

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=41)

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

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=41)

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

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=41)

  • Index Cond: (id = rs.fk_articlegroup)
  • Filter: (fk_client = 1634005599)
13. 0.082 0.082 ↑ 1.0 1 41

Index Scan using maingroup_pkey on maingroup mg (cost=0.29..2.44 rows=1 width=20) (actual time=0.002..0.002 rows=1 loops=41)

  • Index Cond: (id = ag.fk_maingroup)
  • Filter: (fk_client = 1634005599)
14. 0.246 0.246 ↓ 0.0 0 41

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

  • -> 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 41

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

  • Filter: ((r_time >= '2016-12-20 07:40: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 41

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=41)

  • Filter: ((r_time >= '2016-12-20 07:40: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:40: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:40: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 : 35.811 ms
Execution time : 1.216 ms