-
Notifications
You must be signed in to change notification settings - Fork 13
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
Improve performance for getSamplingFeatureDatasets #144
Comments
@emiliom and @lsetiawan - this is the issue I was referring to on the phone today. I'm not sure it should be titled "improve performance", but rather may require a rethinking of the current approach. |
Thanks @Elijahwalkerwest and @horsburgh @lsetiawan and I may or may not have time this week (after today) to give input. But if you can point us to the branch and code where @Elijahwalkerwest's current / latest implementation can be seen, that'll be helpful. Again, no promises! |
The most recent work should be in the development branch. I've been working on a few iterations to try and resolve this but nothing that has worked thus far, and so isn't up on github yet. Added by Emilio, for convenience: https://github.com/ODM2/ODM2PythonAPI/blob/development/odm2api/ODM2/services/readService.py#L969 |
Don and I have taken a quick look. Unfortunately we won't have time to help out on this possibly through next week (we have a hands-on workshop late next week that I'm co-organizing). In the meantime, two things come to mind:
|
result = self._session_factory.engine.execute("SELECT * FROM odm2.samplingfeatures as SF Got SQLAlchemy to run raw query, this is the query I'm using. This look right to you guys? |
Updated version of this SQL query that is currently working, but is VERY SLOW. Also I'm not sure if it's getting all the data needed. Here is the data that is needed for that endpoint. DataSetID, result = self._session_factory.engine.execute("SELECT * FROM odm2.samplingfeatures as SF Currently this query is taking ~ 50 seconds PER Sampling feature. |
I have already utilized eager loading for the SQLALchemy query in the endpoint, but due to the nature of the data needed to be gathered, the current structure is incredibly slow as more Samplingfeatures are queried for. Need to make it usable for a query of all SamplingFeatures of a given Type.
The text was updated successfully, but these errors were encountered: