explain.depesz.com

PostgreSQL's explain analyze made readable

Result: R56p

Settings
# exclusive inclusive rows x rows loops node
1. 1.043 10,517.309 ↑ 1.0 20 1

Limit (cost=549,030.65..549,551.85 rows=20 width=2,557) (actual time=10,508.462..10,517.309 rows=20 loops=1)

2. 1,947.243 10,516.266 ↑ 14.7 6,020 1

Result (cost=392,670.65..2,693,247.45 rows=88,280 width=2,557) (actual time=7,542.770..10,516.266 rows=6,020 loops=1)

3. 388.832 7,539.603 ↑ 14.7 6,020 1

Sort (cost=392,670.65..392,891.35 rows=88,280 width=1,913) (actual time=7,534.464..7,539.603 rows=6,020 loops=1)

  • Sort Key: flat.price DESC
  • Sort Method: top-N heapsort Memory: 41,886kB
4. 2,308.785 7,150.771 ↓ 1.5 134,258 1

Hash Left Join (cost=267,365.75..386,687.24 rows=88,280 width=1,913) (actual time=1,846.952..7,150.771 rows=134,258 loops=1)

  • Hash Cond: (flat.decoration_type_id = decoration_type.id)
5. 52.529 4,841.955 ↓ 1.5 134,258 1

Hash Left Join (cost=267,364.21..386,192.34 rows=88,280 width=3,276) (actual time=1,846.860..4,841.955 rows=134,258 loops=1)

  • Hash Cond: (flat.balcony_type_id = balcony_type.id)
6. 68.677 4,789.345 ↓ 1.5 134,258 1

Nested Loop Left Join (cost=267,360.39..385,950.11 rows=88,280 width=3,256) (actual time=1,846.771..4,789.345 rows=134,258 loops=1)

  • Join Filter: (flat_type.id = flat.type_id)
  • Rows Removed by Join Filter: 580
7. 47.952 4,720.668 ↓ 1.5 134,258 1

Hash Left Join (cost=267,360.39..383,492.08 rows=88,280 width=2,938) (actual time=1,846.748..4,720.668 rows=134,258 loops=1)

  • Hash Cond: (flat.deal_status_id = status.id)
8. 2,217.119 4,672.630 ↓ 1.5 134,258 1

Hash Right Join (cost=267,359.28..383,189.30 rows=88,280 width=2,620) (actual time=1,846.648..4,672.630 rows=134,258 loops=1)

  • Hash Cond: ((split_part((semantic_url_new.request_url)::text, 'flats/'::text, 2))::uuid = flat.id)
9. 609.633 609.633 ↑ 1.0 395,844 1

Seq Scan on semantic_url_new (cost=0.00..114,586.90 rows=414,373 width=1,514) (actual time=0.009..609.633 rows=395,844 loops=1)

  • Filter: ((type)::text = 'REGION_FLAT'::text)
  • Rows Removed by Filter: 38,948
10. 603.646 1,845.878 ↓ 1.5 134,258 1

Hash (cost=266,255.78..266,255.78 rows=88,280 width=1,106) (actual time=1,845.878..1,845.878 rows=134,258 loops=1)

  • Buckets: 131,072 (originally 131072) Batches: 2 (originally 1) Memory Usage: 130,049kB
11. 1,242.232 1,242.232 ↓ 1.5 134,258 1

Seq Scan on flat (cost=0.00..266,255.78 rows=88,280 width=1,106) (actual time=0.098..1,242.232 rows=134,258 loops=1)

  • Filter: (actual AND (address_hierarchy_ids ~@ '366aa393-0eeb-4846-b851-2336568dbc6c'::text) AND (price >= '684020'::bigint) AND (price <= '120814384'::bigint))
  • Rows Removed by Filter: 827,202
12. 0.004 0.086 ↑ 1.0 5 1

Hash (cost=1.05..1.05 rows=5 width=334) (actual time=0.086..0.086 rows=5 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
13. 0.082 0.082 ↑ 1.0 5 1

Seq Scan on status (cost=0.00..1.05 rows=5 width=334) (actual time=0.081..0.082 rows=5 loops=1)

14. 0.000 0.000 ↑ 2.0 1 134,258

Materialize (cost=0.00..1.03 rows=2 width=334) (actual time=0.000..0.000 rows=1 loops=134,258)

15. 0.018 0.018 ↑ 1.0 2 1

Seq Scan on flat_type (cost=0.00..1.02 rows=2 width=334) (actual time=0.017..0.018 rows=2 loops=1)

16. 0.029 0.081 ↓ 1.2 95 1

Hash (cost=2.81..2.81 rows=81 width=36) (actual time=0.081..0.081 rows=95 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 15kB
17. 0.052 0.052 ↓ 1.2 95 1

Seq Scan on balcony_type (cost=0.00..2.81 rows=81 width=36) (actual time=0.027..0.052 rows=95 loops=1)

18. 0.007 0.031 ↑ 1.0 24 1

Hash (cost=1.24..1.24 rows=24 width=135) (actual time=0.031..0.031 rows=24 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
19. 0.024 0.024 ↑ 1.0 24 1

Seq Scan on decoration_type (cost=0.00..1.24 rows=24 width=135) (actual time=0.020..0.024 rows=24 loops=1)

20.          

SubPlan (for Result)

21. 36.120 36.120 ↑ 1.0 1 6,020

Index Scan using building_id_idx on building (cost=0.29..8.30 rows=1 width=13) (actual time=0.006..0.006 rows=1 loops=6,020)

  • Index Cond: (id = flat.building_id)
22. 90.300 90.300 ↓ 0.0 0 6,020

Index Scan using document_advantage_id_idx on document_advantage (cost=0.42..8.44 rows=1 width=745) (actual time=0.015..0.015 rows=0 loops=6,020)

  • Index Cond: (id = flat.document_advantage_id)
23. 903.000 903.000 ↑ 1.0 1 6,020

Index Scan using building_id_idx on building b (cost=0.29..8.55 rows=1 width=32) (actual time=0.150..0.150 rows=1 loops=6,020)

  • Index Cond: (id = flat.building_id)
Planning time : 10.522 ms
Execution time : 10,519.520 ms