Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
explain_analyze_after_clustering
Append (cost=2863.55..20381.25 rows=3 width=4) (actual time=9.613..344.723 rows=3 loops=1)
-> Subquery Scan on "*SELECT* 1" (cost=2863.55..2863.56 rows=1 width=4) (actual time=9.613..9.613 rows=1 loops=1)
-> Limit (cost=2863.55..2863.55 rows=1 width=12) (actual time=9.611..9.612 rows=1 loops=1)
CTE closest_candidates
-> Limit (cost=0.08..2863.36 rows=10 width=64) (actual time=0.961..9.578 rows=10 loops=1)
-> Index Scan using index_etablissements_on_geom on etablissements ent (cost=0.08..11122103.42 rows=38844 width=64) (actual time=0.960..9.575 rows=10 loops=1)
Order By: (geom <-> '0101000020E6100000FC44A7105EA9154082ACD075BEA24540'::geometry)
Filter: ((activite_principale)::text = '1071C'::text)
Rows Removed by Filter: 2080
-> Sort (cost=0.20..0.20 rows=10 width=12) (actual time=9.611..9.611 rows=1 loops=1)
Sort Key: (st_distance(closest_candidates.geom, '0101000020E6100000FC44A7105EA9154082ACD075BEA24540'::geometry))
Sort Method: top-N heapsort Memory: 25kB
-> CTE Scan on closest_candidates (cost=0.00..0.18 rows=10 width=12) (actual time=0.966..9.599 rows=10 loops=1)
-> Subquery Scan on "*SELECT* 2" (cost=8758.85..8758.85 rows=1 width=4) (actual time=107.560..107.560 rows=1 loops=1)
-> Limit (cost=8758.85..8758.85 rows=1 width=12) (actual time=107.558..107.559 rows=1 loops=1)
CTE closest_candidates
-> Limit (cost=8758.65..8758.65 rows=10 width=64) (actual time=107.529..107.531 rows=10 loops=1)
-> Sort (cost=8758.65..8760.91 rows=4539 width=64) (actual time=107.528..107.529 rows=10 loops=1)
Sort Key: ((ent_1.geom <-> '0101000020E6100000FC44A7105EA9154082ACD075BEA24540'::geometry))
Sort Method: top-N heapsort Memory: 27kB
-> Bitmap Heap Scan on etablissements ent_1 (cost=33.12..8739.03 rows=4539 width=64) (actual time=3.771..103.029 rows=11928 loops=1)
Recheck Cond: ((activite_principale)::text = '4711D'::text)
Heap Blocks: exact=11602
-> Bitmap Index Scan on "index_geo_data.etablissements_on_activite_principale" (cost=0.00..32.90 rows=4539 width=0) (actual time=1.968..1.968 rows=11928 loops=1)
Index Cond: ((activite_principale)::text = '4711D'::text)
-> Sort (cost=0.20..0.20 rows=10 width=12) (actual time=107.558..107.558 rows=1 loops=1)
Sort Key: (st_distance(closest_candidates_1.geom, '0101000020E6100000FC44A7105EA9154082ACD075BEA24540'::geometry))
Sort Method: top-N heapsort Memory: 25kB
-> CTE Scan on closest_candidates closest_candidates_1 (cost=0.00..0.18 rows=10 width=12) (actual time=107.536..107.546 rows=10 loops=1)
-> Subquery Scan on "*SELECT* 3" (cost=8758.85..8758.85 rows=1 width=4) (actual time=227.546..227.547 rows=1 loops=1)
-> Limit (cost=8758.85..8758.85 rows=1 width=12) (actual time=227.545..227.545 rows=1 loops=1)
CTE closest_candidates
-> Limit (cost=8758.65..8758.65 rows=10 width=64) (actual time=227.514..227.516 rows=10 loops=1)
-> Sort (cost=8758.65..8760.91 rows=4539 width=64) (actual time=227.513..227.514 rows=10 loops=1)
Sort Key: ((ent_2.geom <-> '0101000020E6100000FC44A7105EA9154082ACD075BEA24540'::geometry))
Sort Method: top-N heapsort Memory: 27kB
-> Bitmap Heap Scan on etablissements ent_2 (cost=33.12..8739.03 rows=4539 width=64) (actual time=7.567..218.777 rows=23988 loops=1)
Recheck Cond: ((activite_principale)::text = '4773Z'::text)
Heap Blocks: exact=23243
-> Bitmap Index Scan on "index_geo_data.etablissements_on_activite_principale" (cost=0.00..32.90 rows=4539 width=0) (actual time=3.954..3.954 rows=23988 loops=1)
Index Cond: ((activite_principale)::text = '4773Z'::text)
-> Sort (cost=0.20..0.20 rows=10 width=12) (actual time=227.544..227.544 rows=1 loops=1)
Sort Key: (st_distance(closest_candidates_2.geom, '0101000020E6100000FC44A7105EA9154082ACD075BEA24540'::geometry))
Sort Method: top-N heapsort Memory: 25kB
-> CTE Scan on closest_candidates closest_candidates_2 (cost=0.00..0.18 rows=10 width=12) (actual time=227.521..227.532 rows=10 loops=1)
Planning time: 0.557 ms
Execution time: 344.839 ms
(47 rows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment