explain.depesz.com

PostgreSQL's explain analyze made readable

Result: dL9h

Settings
# exclusive inclusive rows x rows loops node
1. 0.047 1.999 ↓ 1.9 46 1

Nested Loop Left Join (cost=8.57..280.99 rows=24 width=115) (actual time=0.141..1.999 rows=46 loops=1)

2. 0.064 0.158 ↓ 1.9 46 1

Hash Join (cost=8.29..87.90 rows=24 width=36) (actual time=0.081..0.158 rows=46 loops=1)

  • Hash Cond: (stock.product_article_code = currency.product_article_code)
3. 0.035 0.058 ↑ 1.0 173 1

Bitmap Heap Scan on stock (cost=5.62..84.79 rows=173 width=37) (actual time=0.030..0.058 rows=173 loops=1)

  • Recheck Cond: (office_id = 31)
  • Heap Blocks: exact=4
4. 0.023 0.023 ↑ 1.0 173 1

Bitmap Index Scan on stock_office_id_index (cost=0.00..5.58 rows=173 width=0) (actual time=0.023..0.023 rows=173 loops=1)

  • Index Cond: (office_id = 31)
5. 0.018 0.036 ↑ 1.0 74 1

Hash (cost=1.74..1.74 rows=74 width=8) (actual time=0.036..0.036 rows=74 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
6. 0.018 0.018 ↑ 1.0 74 1

Seq Scan on currency (cost=0.00..1.74 rows=74 width=8) (actual time=0.009..0.018 rows=74 loops=1)

7. 0.598 0.598 ↑ 1.0 1 46

Index Scan using product_article_translations_product_article_code_language_pk on product_article_translations (cost=0.28..3.60 rows=1 width=52) (actual time=0.013..0.013 rows=1 loops=46)

  • Index Cond: ((currency.product_article_code = product_article_code) AND (language = 'et'::bpchar))
8.          

SubPlan (forNested Loop Left Join)

9. 0.138 1.196 ↑ 1.0 1 46

Aggregate (cost=4.44..4.45 rows=1 width=32) (actual time=0.025..0.026 rows=1 loops=46)

10. 1.058 1.058 ↓ 0.0 0 46

Seq Scan on expected_stock (cost=0.00..4.43 rows=1 width=13) (actual time=0.023..0.023 rows=0 loops=46)

  • Filter: ((quantity IS NOT NULL) AND (product_article_code = currency.product_article_code) AND (office_id = 31))
  • Rows Removed by Filter: 165
Planning time : 1.783 ms
Execution time : 2.119 ms