Skip to content
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

Optimize complex sql #651

Merged
merged 6 commits into from
Feb 13, 2014
Merged

Optimize complex sql #651

merged 6 commits into from
Feb 13, 2014

Conversation

0robustus1
Copy link
Contributor

Move SQL-Query logic for recursive Graph-Data queries into a PSQL-Function.

Use a modified Version of the graph-data
query statement. Instead of looping
through by ourselves we use the PostgreSQL
recursive WITH Query to let the database do this for us

This increases the initial cost of the query but it scales
much more nicely when performing queries on much more
complex data or with a much bigger depth.
Although this might not be as useful, since
the calculated cost of functions is not such
a useful indicator for their cpu-cost.
@nning
Copy link
Contributor

nning commented Feb 13, 2014

Just out of interest: Of big was the performance difference of the statements?
👍

@0robustus1
Copy link
Contributor Author

If i remember correctly somewhat along the lines of 5 times faster. But i couldn't test
on a graph-layout which failed with the old queries (as this was actually the goal of these changes).

0robustus1 added a commit that referenced this pull request Feb 13, 2014
@0robustus1 0robustus1 merged commit b1c6b85 into staging Feb 13, 2014
@0robustus1 0robustus1 deleted the optimize_complex_sql branch February 13, 2014 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants