Geographic Information Systems Asked by Lush_coding on August 25, 2020
I have the following code but the output is empty. It is very slow. I want a pair to pair pgr_dijstracost rather than many to many. Is there a feasible solution?
DO
$do$
DECLARE
ii int := 1;
BEGIN
WHILE ii < 1396381
LOOP
INSERT INTO public.loop (start_vid,end_vid,agg_cost)
Select * from pgr_dijkstraCost(
'select gid as id, source, target, length as cost from table1'
,(select table1.source from table1 Inner join table2 on table2.segment = table1.segment where table2.id = ii)
,(select table1.target from table1Inner join table2 on table2.segment2= table1.segment where table2.id = ii)
,false);
ii := ii + 1;
END LOOP;
END
$do$
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP