google-code-export / stoqs

Automatically exported from code.google.com/p/stoqs
GNU General Public License v3.0
1 stars 1 forks source link

Sampled parameter SQL error #42

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Platform = WesternFlyer_PCTD
2. Sampled Parameters = Chlorophyll, Nitrate
3. Sampled Parameters Data Access = sql

What is the expected output? What do you see instead?
SQL code to extract sample parameters.  The measured parameter code is 
displayed.

What version of the product are you using? On what operating system?
Version linked to https://odss.mbari.org/odss/
OS = Windows 7

Please provide any additional information below.

Original issue reported on code.google.com by reik...@gmail.com on 11 Feb 2014 at 12:38

GoogleCodeExporter commented 9 years ago

Original comment by MBARIm...@gmail.com on 11 Feb 2014 at 7:11

GoogleCodeExporter commented 9 years ago
The summary data response has only an 'sql' item. Sampled Parameter selection 
was added to the UI and an associated sql string for SPs.  Need to add a 
getSampledParametersPostgreSQL() method to utils/STOQSQManager.py and wire up 
the associated handling.

Original comment by MBARIm...@gmail.com on 11 Feb 2014 at 7:46

GoogleCodeExporter commented 9 years ago
On Production server the count query for a 3+ million record database takes 
more than 6 seconds:

2014-02-11 08:53:45 PST [10034]: [8-1] user=stoqsadm, 
db=stoqs_september2013_oLOG:  duration: 6383.536 ms  statement: SELECT COUNT(*) 
FROM (SELECT "stoqs_measuredparameter"."parameter_id" AS "parameter_id", 
"stoqs_parameter"."name" AS "name", "stoqs_parameter"."standard_name" AS 
"standard_name", "stoqs_measurement"."depth" AS "depth", 
"stoqs_measurement"."geom" AS "geom", "stoqs_instantpoint"."timevalue" AS 
"timevalue", "stoqs_activity"."name" AS Col6, "stoqs_platform"."name" AS Col7, 
"stoqs_measuredparameter"."datavalue" AS "datavalue", "stoqs_parameter"."units" 
AS "units" FROM "stoqs_measuredparameter" INNER JOIN "stoqs_parameter" ON 
("stoqs_measuredparameter"."parameter_id" = "stoqs_parameter"."id") INNER JOIN 
"stoqs_measurement" ON ("stoqs_measuredparameter"."measurement_id" = 
"stoqs_measurement"."id") INNER JOIN "stoqs_instantpoint" ON 
("stoqs_measurement"."instantpoint_id" = "stoqs_instantpoint"."id") INNER JOIN 
"stoqs_activity" ON ("stoqs_instantpoint"."activity_id" = 
"stoqs_activity"."id") INNER JOIN "stoqs_platform" ON 
("stoqs_activity"."platform_id" = "stoqs_platform"."id")) subquery

The SQL strings need to be generated on the server only when the user expects 
to see them indicated by when those sections-tabs are open.

Perhaps a flag can be passed to the summary service to indicated whether to 
generate spsql and mpsql...

Original comment by MBARIm...@gmail.com on 11 Feb 2014 at 5:00

GoogleCodeExporter commented 9 years ago
A 22 Million measurement campaign is really bad (28.8 seconds!):

2014-02-11 09:01:12 PST [10458]: [8-1] user=stoqsadm, 
db=stoqs_september2013LOG:  duration: 28850.425 ms  statement: SELECT COUNT(*) 
FROM (SELECT "stoqs_measuredparameter"."parameter_id" AS "parameter_id", 
"stoqs_parameter"."name" AS "name", "stoqs_parameter"."standard_name" AS 
"standard_name", "stoqs_measurement"."depth" AS "depth", 
"stoqs_measurement"."geom" AS "geom", "stoqs_instantpoint"."timevalue" AS 
"timevalue", "stoqs_activity"."name" AS Col6, "stoqs_platform"."name" AS Col7, 
"stoqs_measuredparameter"."datavalue" AS "datavalue", "stoqs_parameter"."units" 
AS "units" FROM "stoqs_measuredparameter" INNER JOIN "stoqs_parameter" ON 
("stoqs_measuredparameter"."parameter_id" = "stoqs_parameter"."id") INNER JOIN 
"stoqs_measurement" ON ("stoqs_measuredparameter"."measurement_id" = 
"stoqs_measurement"."id") INNER JOIN "stoqs_instantpoint" ON 
("stoqs_measurement"."instantpoint_id" = "stoqs_instantpoint"."id") INNER JOIN 
"stoqs_activity" ON ("stoqs_instantpoint"."activity_id" = 
"stoqs_activity"."id") INNER JOIN "stoqs_platform" ON 
("stoqs_activity"."platform_id" = "stoqs_platform"."id")) subquery

Original comment by MBARIm...@gmail.com on 11 Feb 2014 at 5:02

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 762332e20baa.

Original comment by MBARIm...@gmail.com on 12 Feb 2014 at 6:25

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 762332e20baa.

Original comment by MBARIm...@gmail.com on 20 Sep 2014 at 7:48