explain.depesz.com

PostgreSQL's explain analyze made readable

Result: e8X6

Settings
# exclusive inclusive rows x rows loops node
1. 0.047 0.978 ↓ 44.0 44 1

Sort (cost=734.78..734.78 rows=1 width=328) (actual time=0.975..0.978 rows=44 loops=1)

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

Nested Loop Left Join (cost=1.28..734.77 rows=1 width=328) (actual time=0.209..0.931 rows=44 loops=1)

3. 0.005 0.654 ↓ 44.0 44 1

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

4. 0.013 0.561 ↓ 44.0 44 1

Nested Loop (cost=0.99..725.92 rows=1 width=208) (actual time=0.154..0.561 rows=44 loops=1)

5. 0.023 0.460 ↓ 44.0 44 1

Nested Loop (cost=0.71..723.33 rows=1 width=193) (actual time=0.137..0.460 rows=44 loops=1)

6. 0.008 0.305 ↓ 44.0 44 1

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

7. 0.177 0.209 ↓ 11.0 44 1

Append (cost=0.00..710.12 rows=4 width=169) (actual time=0.107..0.209 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.119 ro
8. 0.017 0.017 ↓ 0.0 0 1

Seq Scan on receiptsale rs (cost=0.00..0.00 rows=1 width=328) (actual time=0.017..0.017 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.73 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=44)

  • Index Cond: (id = rs.fk_salearticle)
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.088 0.088 ↑ 1.0 1 44

Index Scan using maingroup_pkey on maingroup mg (cost=0.29..1.44 rows=1 width=20) (actual time=0.002..0.002 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.875 ms
Execution time : 1.254 ms