explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Q75k

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 2.152 ↑ 1.0 1 1

Limit (cost=512.00..512.00 rows=1 width=78) (actual time=2.150..2.152 rows=1 loops=1)

2. 0.006 2.149 ↑ 532.0 1 1

Sort (cost=512.00..513.33 rows=532 width=78) (actual time=2.149..2.149 rows=1 loops=1)

  • Sort Key: (length((pre.pre_from)::text)) DESC
  • Sort Method: quicksort Memory: 25kB
3. 0.015 2.143 ↑ 532.0 1 1

Hash Join (cost=3.85..509.34 rows=532 width=78) (actual time=0.098..2.143 rows=1 loops=1)

  • Hash Cond: (pre.sw_products_id = pro.sw_products_id)
4. 2.077 2.077 ↑ 532.0 1 1

Seq Scan on sw_prefix pre (cost=0.00..502.70 rows=532 width=18) (actual time=0.033..2.077 rows=1 loops=1)

  • Filter: ((pre_enable = 1) AND ((pre_from)::text <= substr('222100'::text, 1, length((pre_from)::text))) AND ((pre_to)::text >= substr('272099'::text, 1, length((pre_to)::text))))
  • Rows Removed by Filter: 4788
5. 0.028 0.051 ↑ 1.0 82 1

Hash (cost=2.82..2.82 rows=82 width=46) (actual time=0.050..0.051 rows=82 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
6. 0.023 0.023 ↑ 1.0 82 1

Seq Scan on sw_products pro (cost=0.00..2.82 rows=82 width=46) (actual time=0.004..0.023 rows=82 loops=1)