Skip to content

Commit

Permalink
Revert "Fix self-connection not showing as low stress"
Browse files Browse the repository at this point in the history
This reverts commit 706ef97.

Revert self-connection fix due to extreme slowness in DB operations
  • Loading branch information
spencerrecneps committed Jul 23, 2018
1 parent 8d819c7 commit b2e9b88
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions pybna/sql/connectivity/tile_based_connectivity.sql
Original file line number Diff line number Diff line change
Expand Up @@ -107,28 +107,12 @@ WHERE
tmp_allverts.start_vid = source_vert.{vert_id_col}
AND tmp_allverts.end_vid = target_vert.{vert_id_col}
)
AND source.id != target.id
ORDER BY
source_id,
target_id,
agg_cost ASC;

DROP TABLE pg_temp.tmp_allverts;

INSERT INTO tmp_lostress
SELECT
source.id AS source_id,
target.id AS target_id,
0
FROM
tmp_allblocks source,
tmp_allblocks target,
{tiles_table} tile
WHERE
tile.{tile_id_col}={tile_id}
AND ST_Intersects(source.geom,tile.{tile_geom_col})
AND source.id = target.id;

CREATE INDEX tidx_lostress ON tmp_lostress (source_id,target_id);
ANALYZE tmp_lostress;

Expand Down

0 comments on commit b2e9b88

Please sign in to comment.