-
-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combinations SQL #1648
Comments
I think I should proceed sequentially. So, after completing withPoints, I'll go with aStar. |
For the flow family of functions, if the combinations query has: |
Congratulations for this excellent work ! The combinations SQL signature helped significantly reducing the runtime of our trajectory data generator. The only draw back is that the combinations SQL is passed as a string. It thus cannot reuse results from the outer query. The following query, for example, will through an error: CREATE TABLE combinations AS( SELECT * FROM pgr_dijkstra( The database table combinations, was created only for the sake of being able to use the combinations SQL. After running the pgr_dijkstra query, this table remains as junk in the database. Clearly this is not the optimal solution. A more flexible solution would be to invent a "combination nested array" signature, rather than the "combinations SQL" signature. The main difference is that the "combinations nested array" can be constructed in the outer query. Every sub array in the combinations nested array is a pair of source and target. Here is an example: WITH pairs(source, target) AS( |
All our queries are passed as string. So the first example you wrote can be written like this.
The nested array structure looks interesting, you might put that in another issue. |
@krashish8 Thanks for this hard work |
On 3.1 these signatures were added
Add the signature(s) of Combinations SQL for the following functions
From official functions:
aStar - Family of functions [#1732]
Bidirectional A* - Family of functions [#1774]
Bidirectional Dijkstra - Family of functions [#1775]
Flow - Family of functions [#1777]
From proposed functions:
withPoints - Family of functions [#1649]
From experimental functions:
Flow - Family of functions [#1777]
The text was updated successfully, but these errors were encountered: