-
Notifications
You must be signed in to change notification settings - Fork 82
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
InsertResult / GetObservation reponse time #825
Comments
Hi, in the SOS 4.4.x several extensions resulted in a SQL query being sent to the db for each inserted observation to prevent duplicate data. But this "check" can be disabled via the setting "Should this SOS check for duplicated observations in the REQUEST?" located in the "service" tab. If you can guarantee that no duplicate observation would be insertedm you can disable the flag. Querying directly the database is one part of a GetObservation request,therefore this cannot be compared. In the SOS we use the Hibernate framwork to support several database managment systems and the queries (with required joins) are generated under the hood. This leads to other queries that can be a bit more complex as if I query the observation table directly. Furthermore the data from the database must be processed and formatted to the response format (e.g. XML). Depending on the used client/browser to send the GetObservation, the response would be "pretty printed" which also sometimes takes a while. The injection process can be speed by disabling the flag I mentioned before. For the retrieval of large amounts of data we recommend to use the GetResult operation because this reduces the XML processing of the response and the responses are much smaller. |
Hi Carsten, SOS Version: 4.4.5 SOS Version: 4.4.5 SOS Version: 4.4.14 SOS Version: 4.4.14 SOS Version: 5.1.0 For us this is a blocking issue since we are working with datasets that can be several months long (the test datasets is only 25 minutes long). The SOS webapp takes days to inject them to the SOS database and hours to retrieve each dataset, even if we split it into smaller requests. Is there any other tweak to speed it up? Is it possible to bypass the hibernate framework? Maybe some postgresql settings may be adjusted to squeeze more performance from the database? Thanks |
Hi,
I'm converting data from a set of CSV files to O&M and Inserting them with InsertResult (using ComplexObservation). I've found that it takes a huge amount of time to insert them to the database. For instance adding 45 minutes of data (about 2700 observations with timestamp, lat, long and 6 other values) takes approximately 2 minutes using a SOS deployed in my desktop computer with an SSD.
GetObservation response time for the same amount of data is also slow, about 12 seconds to retrieve 2700 observations (also using an SSD). If I query directly the database it takes only 8 milliseconds.
If I try to add a day worth of data it will take more than one hour to inject it and about 6.5 minutes to retrieve it. If I need to add / query a month of data it's simply impossible. Is there any way to speed-up injection/retrieval processes? Is there some bug causing slow responses for large time periods?
I've also tried using 6 separated OM_Measurement instead of a ComplexObservation and the results are more or less the same. I'm using version SOS version 4.4.14, postgresql 10.
Attached you can find the files to replicate this issue (InsertSensor, InsertResultTemplate, InsertResult and getObservation) .
transactions.zip
The text was updated successfully, but these errors were encountered: