explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1gay

Settings
# exclusive inclusive rows x rows loops node
1. 0.016 2,399.620 ↑ 6.0 1 1

Sort (cost=140.76..140.77 rows=6 width=722) (actual time=2,399.620..2,399.620 rows=1 loops=1)

  • Output: a.id, a.apb, a.cancellation_code, a.cnk, a.created_by, a.created_on, a.description_fr, a.description_nl, a.doping_code_fr, a.doping_code_vl, a.is_cancelled, a.is_fmd_product, a.is_on_prescription, a.is_own_product, a.modified_by, a.modified_on, a.package_code, a.package_quantity, a.popularity, a.product_group_id, a.product_legal_code, a.product_type, a.sequence_id, a.supplier_distributer, a.supplier_labo, a.tarinfo, a.versionnumber_ftbproducten, a0.id, a0.apb, a0.availability_code, a0.catalog_product_id, a0.cnk, a0.created_by, a0.created_on, a0.has_robot_location, a0.modified_by, a0.modified_on, a0.preservation_code, a0.quantity_in_pharmacy, a0.quantity_in_robot, a0.total_quantity_in_stock, a0.versionnumber_ftbproducten, a0.versionnumber_ftbproductstock, a1.id, a1.apb, a1.base_price, a1.catalog_product_id, a1.cnk, a1.created_by, a1.created_on, a1.modified_by, a1.modified_on, a1.profit_margin_purchase, a1.profit_margin_sales, a1.purchase_price, a1.sales_price, a1.sales_price_online, a1.sales_tva_percentage, a1.versionnumber_ftbproducten, a2.id, a2.apb, a2.code, a2.created_by, a2.created_on, a2.group_description_fr, a2.group_description_nl, a2.group_id, a2.modified_by, a2.modified_on, p.id, p.alt_code_id, p.product_id, a3.id, a3.cnk, a3.code_type, a3.code_value, a3.created_by, a3.created_on, a3.modified_by, a3.modified_on
  • Sort Key: a.id, a2.id, p.id, p.alt_code_id
  • Sort Method: quicksort Memory: 26kB
  • Buffers: shared hit=14 read=63 dirtied=4
  • I/O Timings: read=2,397.320
2. 0.010 2,399.604 ↑ 6.0 1 1

Nested Loop Left Join (cost=2.29..140.68 rows=6 width=722) (actual time=2,220.047..2,399.604 rows=1 loops=1)

  • Output: a.id, a.apb, a.cancellation_code, a.cnk, a.created_by, a.created_on, a.description_fr, a.description_nl, a.doping_code_fr, a.doping_code_vl, a.is_cancelled, a.is_fmd_product, a.is_on_prescription, a.is_own_product, a.modified_by, a.modified_on, a.package_code, a.package_quantity, a.popularity, a.product_group_id, a.product_legal_code, a.product_type, a.sequence_id, a.supplier_distributer, a.supplier_labo, a.tarinfo, a.versionnumber_ftbproducten, a0.id, a0.apb, a0.availability_code, a0.catalog_product_id, a0.cnk, a0.created_by, a0.created_on, a0.has_robot_location, a0.modified_by, a0.modified_on, a0.preservation_code, a0.quantity_in_pharmacy, a0.quantity_in_robot, a0.total_quantity_in_stock, a0.versionnumber_ftbproducten, a0.versionnumber_ftbproductstock, a1.id, a1.apb, a1.base_price, a1.catalog_product_id, a1.cnk, a1.created_by, a1.created_on, a1.modified_by, a1.modified_on, a1.profit_margin_purchase, a1.profit_margin_sales, a1.purchase_price, a1.sales_price, a1.sales_price_online, a1.sales_tva_percentage, a1.versionnumber_ftbproducten, a2.id, a2.apb, a2.code, a2.created_by, a2.created_on, a2.group_description_fr, a2.group_description_nl, a2.group_id, a2.modified_by, a2.modified_on, p.id, p.alt_code_id, p.product_id, a3.id, a3.cnk, a3.code_type, a3.code_value, a3.created_by, a3.created_on, a3.modified_by, a3.modified_on
  • Buffers: shared hit=14 read=63 dirtied=4
  • I/O Timings: read=2,397.320
3. 0.003 2,379.228 ↑ 2.0 1 1

Limit (cost=1.57..105.78 rows=2 width=589) (actual time=2,199.673..2,379.228 rows=1 loops=1)

  • Output: a.id, a.apb, a.cancellation_code, a.cnk, a.created_by, a.created_on, a.description_fr, a.description_nl, a.doping_code_fr, a.doping_code_vl, a.is_cancelled, a.is_fmd_product, a.is_on_prescription, a.is_own_product, a.modified_by, a.modified_on, a.package_code, a.package_quantity, a.popularity, a.product_group_id, a.product_legal_code, a.product_type, a.sequence_id, a.supplier_distributer, a.supplier_labo, a.tarinfo, a.versionnumber_ftbproducten, a0.id, a0.apb, a0.availability_code, a0.catalog_product_id, a0.cnk, a0.created_by, a0.created_on, a0.has_robot_location, a0.modified_by, a0.modified_on, a0.preservation_code, a0.quantity_in_pharmacy, a0.quantity_in_robot, a0.total_quantity_in_stock, a0.versionnumber_ftbproducten, a0.versionnumber_ftbproductstock, a1.id, a1.apb, a1.base_price, a1.catalog_product_id, a1.cnk, a1.created_by, a1.created_on, a1.modified_by, a1.modified_on, a1.profit_margin_purchase, a1.profit_margin_sales, a1.purchase_price, a1.sales_price, a1.sales_price_online, a1.sales_tva_percentage, a1.versionnumber_ftbproducten, a2.id, a2.apb, a2.code, a2.created_by, a2.created_on, a2.group_description_fr, a2.group_description_nl, a2.group_id, a2.modified_by, a2.modified_on
  • Buffers: shared hit=12 read=62 dirtied=4
  • I/O Timings: read=2,376.983
4. 0.009 2,379.225 ↑ 11.0 1 1

Nested Loop (cost=1.57..574.72 rows=11 width=589) (actual time=2,199.672..2,379.225 rows=1 loops=1)

  • Output: a.id, a.apb, a.cancellation_code, a.cnk, a.created_by, a.created_on, a.description_fr, a.description_nl, a.doping_code_fr, a.doping_code_vl, a.is_cancelled, a.is_fmd_product, a.is_on_prescription, a.is_own_product, a.modified_by, a.modified_on, a.package_code, a.package_quantity, a.popularity, a.product_group_id, a.product_legal_code, a.product_type, a.sequence_id, a.supplier_distributer, a.supplier_labo, a.tarinfo, a.versionnumber_ftbproducten, a0.id, a0.apb, a0.availability_code, a0.catalog_product_id, a0.cnk, a0.created_by, a0.created_on, a0.has_robot_location, a0.modified_by, a0.modified_on, a0.preservation_code, a0.quantity_in_pharmacy, a0.quantity_in_robot, a0.total_quantity_in_stock, a0.versionnumber_ftbproducten, a0.versionnumber_ftbproductstock, a1.id, a1.apb, a1.base_price, a1.catalog_product_id, a1.cnk, a1.created_by, a1.created_on, a1.modified_by, a1.modified_on, a1.profit_margin_purchase, a1.profit_margin_sales, a1.purchase_price, a1.sales_price, a1.sales_price_online, a1.sales_tva_percentage, a1.versionnumber_ftbproducten, a2.id, a2.apb, a2.code, a2.created_by, a2.created_on, a2.group_description_fr, a2.group_description_nl, a2.group_id, a2.modified_by, a2.modified_on
  • Inner Unique: true
  • Buffers: shared hit=12 read=62 dirtied=4
  • I/O Timings: read=2,376.983
5. 0.012 2,379.189 ↑ 11.0 1 1

Nested Loop Left Join (cost=1.29..487.41 rows=11 width=482) (actual time=2,199.636..2,379.189 rows=1 loops=1)

  • Output: a.id, a.apb, a.cancellation_code, a.cnk, a.created_by, a.created_on, a.description_fr, a.description_nl, a.doping_code_fr, a.doping_code_vl, a.is_cancelled, a.is_fmd_product, a.is_on_prescription, a.is_own_product, a.modified_by, a.modified_on, a.package_code, a.package_quantity, a.popularity, a.product_group_id, a.product_legal_code, a.product_type, a.sequence_id, a.supplier_distributer, a.supplier_labo, a.tarinfo, a.versionnumber_ftbproducten, a0.id, a0.apb, a0.availability_code, a0.catalog_product_id, a0.cnk, a0.created_by, a0.created_on, a0.has_robot_location, a0.modified_by, a0.modified_on, a0.preservation_code, a0.quantity_in_pharmacy, a0.quantity_in_robot, a0.total_quantity_in_stock, a0.versionnumber_ftbproducten, a0.versionnumber_ftbproductstock, a1.id, a1.apb, a1.base_price, a1.catalog_product_id, a1.cnk, a1.created_by, a1.created_on, a1.modified_by, a1.modified_on, a1.profit_margin_purchase, a1.profit_margin_sales, a1.purchase_price, a1.sales_price, a1.sales_price_online, a1.sales_tva_percentage, a1.versionnumber_ftbproducten
  • Inner Unique: true
  • Buffers: shared hit=9 read=62 dirtied=4
  • I/O Timings: read=2,376.983
6. 0.014 2,339.189 ↑ 11.0 1 1

Nested Loop Left Join (cost=0.86..394.49 rows=11 width=350) (actual time=2,159.637..2,339.189 rows=1 loops=1)

  • Output: a.id, a.apb, a.cancellation_code, a.cnk, a.created_by, a.created_on, a.description_fr, a.description_nl, a.doping_code_fr, a.doping_code_vl, a.is_cancelled, a.is_fmd_product, a.is_on_prescription, a.is_own_product, a.modified_by, a.modified_on, a.package_code, a.package_quantity, a.popularity, a.product_group_id, a.product_legal_code, a.product_type, a.sequence_id, a.supplier_distributer, a.supplier_labo, a.tarinfo, a.versionnumber_ftbproducten, a0.id, a0.apb, a0.availability_code, a0.catalog_product_id, a0.cnk, a0.created_by, a0.created_on, a0.has_robot_location, a0.modified_by, a0.modified_on, a0.preservation_code, a0.quantity_in_pharmacy, a0.quantity_in_robot, a0.total_quantity_in_stock, a0.versionnumber_ftbproducten, a0.versionnumber_ftbproductstock
  • Inner Unique: true
  • Buffers: shared hit=7 read=60 dirtied=4
  • I/O Timings: read=2,337.043
7. 2,279.159 2,279.159 ↑ 11.0 1 1

Index Scan using "IX_apb_products_cnk" on public.apb_products a (cost=0.43..301.57 rows=11 width=231) (actual time=2,099.608..2,279.159 rows=1 loops=1)

  • Output: a.id, a.created_on, a.created_by, a.modified_on, a.modified_by, a.cnk, a.apb, a.sequence_id, a.versionnumber_ftbproducten, a.description_nl, a.description_fr, a.is_cancelled, a.cancellation_code, a.is_on_prescription, a.product_type, a.product_legal_code, a.is_own_product, a.tarinfo, a.doping_code_vl, a.doping_code_fr, a.package_code, a.package_quantity, a.supplier_labo, a.supplier_distributer, a.is_fmd_product, a.product_group_id, a.popularity
  • Index Cond: ((a.cnk)::text = '3386141'::text)
  • Filter: (a.apb IS NULL)
  • Rows Removed by Filter: 58
  • Buffers: shared hit=5 read=57 dirtied=4
  • I/O Timings: read=2,277.089
8. 60.016 60.016 ↑ 1.0 1 1

Index Scan using "IX_apb_product_stock_info_catalog_product_id" on public.apb_product_stock_info a0 (cost=0.43..8.45 rows=1 width=119) (actual time=60.016..60.016 rows=1 loops=1)

  • Output: a0.id, a0.created_on, a0.created_by, a0.modified_on, a0.modified_by, a0.cnk, a0.apb, a0.versionnumber_ftbproducten, a0.versionnumber_ftbproductstock, a0.availability_code, a0.has_robot_location, a0.total_quantity_in_stock, a0.quantity_in_pharmacy, a0.quantity_in_robot, a0.preservation_code, a0.catalog_product_id
  • Index Cond: (a.id = a0.catalog_product_id)
  • Buffers: shared hit=2 read=3
  • I/O Timings: read=59.954
9. 39.988 39.988 ↑ 1.0 1 1

Index Scan using "IX_apb_product_price_info_catalog_product_id" on public.apb_product_price_info a1 (cost=0.43..8.45 rows=1 width=132) (actual time=39.988..39.988 rows=1 loops=1)

  • Output: a1.id, a1.created_on, a1.created_by, a1.modified_on, a1.modified_by, a1.cnk, a1.apb, a1.versionnumber_ftbproducten, a1.sales_tva_percentage, a1.base_price, a1.sales_price, a1.sales_price_online, a1.purchase_price, a1.profit_margin_purchase, a1.profit_margin_sales, a1.catalog_product_id
  • Index Cond: (a.id = a1.catalog_product_id)
  • Buffers: shared hit=2 read=2
  • I/O Timings: read=39.940
10. 0.027 0.027 ↑ 1.0 1 1

Index Scan using "PK_apb_product_groups" on public.apb_product_groups a2 (cost=0.28..7.94 rows=1 width=107) (actual time=0.027..0.027 rows=1 loops=1)

  • Output: a2.id, a2.created_on, a2.created_by, a2.modified_on, a2.modified_by, a2.code, a2.group_description_nl, a2.group_description_fr, a2.apb, a2.group_id
  • Index Cond: (a2.id = a.product_group_id)
  • Buffers: shared hit=3
11. 0.002 20.366 ↓ 0.0 0 1

Nested Loop (cost=0.72..17.41 rows=3 width=133) (actual time=20.365..20.366 rows=0 loops=1)

  • Output: p.id, p.alt_code_id, p.product_id, a3.id, a3.cnk, a3.code_type, a3.code_value, a3.created_by, a3.created_on, a3.modified_by, a3.modified_on
  • Inner Unique: true
  • Buffers: shared hit=2 read=1
  • I/O Timings: read=20.336
12. 20.364 20.364 ↓ 0.0 0 1

Index Scan using "IX_product_alt_code_product_id_alt_code_id" on public.product_alt_code p (cost=0.43..16.48 rows=3 width=48) (actual time=20.364..20.364 rows=0 loops=1)

  • Output: p.id, p.product_id, p.alt_code_id
  • Index Cond: (a.id = p.product_id)
  • Buffers: shared hit=2 read=1
  • I/O Timings: read=20.336
13. 0.000 0.000 ↓ 0.0 0

Index Scan using "PK_alt_codes" on public.alt_codes a3 (cost=0.29..0.31 rows=1 width=85) (never executed)

  • Output: a3.id, a3.created_on, a3.created_by, a3.modified_on, a3.modified_by, a3.cnk, a3.code_type, a3.code_value
  • Index Cond: (a3.id = p.alt_code_id)
Planning time : 1.082 ms
Execution time : 2,399.737 ms