|
Should have added debug info. My fault, see here:
CDbException
CDbCommand failed to execute the SQL statement: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "group"
LINE 1: ...gid"="group"."gid") WHERE (t.sid=172177) ORDER BY group.grou...
^. The SQL statement executed was: SELECT "t"."qid" AS "t0_c0", "t"."parent_qid" AS "t0_c1", "t"."sid" AS "t0_c2", "t"."gid" AS "t0_c3", "t"."type" AS "t0_c4", "t"."title" AS "t0_c5", "t"."preg" AS "t0_c6", "t"."other" AS "t0_c7", "t"."mandatory" AS "t0_c8", "t"."encrypted" AS "t0_c9", "t"."question_order" AS "t0_c10", "t"."scale_id" AS "t0_c11", "t"."same_default" AS "t0_c12", "t"."relevance" AS "t0_c13", "t"."modulename" AS "t0_c14", "group"."gid" AS "t1_c0", "group"."sid" AS "t1_c1", "group"."group_order" AS "t1_c2", "group"."randomization_group" AS "t1_c3", "group"."grelevance" AS "t1_c4" FROM "lime_questions" "t" LEFT OUTER JOIN "lime_groups" "group" ON ("t"."gid"="group"."gid") WHERE (t.sid=172177) ORDER BY group.group_order DESC, question_order
/var/www/html/framework/db/CDbCommand.php(543)
531 {
532 if($this->_connection->enableProfiling)
533 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
534
535 $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
536 $message=$e->getMessage();
537 Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.',
538 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
539
540 if(YII_DEBUG)
541 $message.='. The SQL statement executed was: '.$this->getText().$par;
542
543 throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
544 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
545 }
546 }
547
548 /*
549 Builds a SQL SELECT statement from the given query specification.
550 @param array $query the query specification in name-value pairs. The following
551 query options are supported: {@link select}, {@link distinct}, {@link from},
552 {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
553 {@link limit}, {@link offset} and {@link union}.
554 @throws CDbException if "from" key is not present in given query parameter
555 @return string the SQL statement
Stack Trace
#0
+
/var/www/html/framework/db/CDbCommand.php(396): CDbCommand->queryInternal()
#1
+
/var/www/html/framework/db/ar/CActiveFinder.php(810): CDbCommand->queryAll()
#2
+
/var/www/html/framework/db/ar/CActiveFinder.php(441): CJoinElement->runQuery()
#3
+
/var/www/html/framework/db/ar/CActiveFinder.php(68): CJoinElement->find()
#4
+
/var/www/html/framework/db/ar/CActiveRecord.php(1364): CActiveFinder->query()
#5
–
/var/www/html/application/models/LSActiveRecord.php(74): CActiveRecord->query()
69 @since 1.1.7
70 /
71 protected function query($criteria, $all = false, $asAR = true)
72 {
73 if ($asAR === true) {
74 return parent::query($criteria, $all);
75 } else {
76 $this->beforeFind();
77 $this->applyScopes($criteria);
78 if (!$all) {
79 $criteria->limit = 1;
#6
+
/var/www/html/framework/db/ar/CActiveRecord.php(1478): LSActiveRecord->query()
#7
–
/var/www/html/application/models/Question.php(496): CActiveRecord->findAll()
491 @param string $language
492 @return Question[]
493 */
494 public function getQuestionList($surveyid)
495 {
496 return Question::model()->with('group')->findAll(array('condition'=>'t.sid='.$surveyid, 'order'=>'group.group_order DESC, question_order'));
497 }
498
499 /*
500 @return string
501 */
#8
–
/var/www/html/application/controllers/admin/statistics.php(669): Question->getQuestionList()
664 $summary[2] = "datestampL";
665 $summary[3] = "idG";
666 $summary[4] = "idL";
667
668 // 1: Get list of questions from survey
669 $rows = Question::model()->getQuestionList($surveyid);
670
671 //SORT IN NATURAL ORDER!
672 usort($rows, 'groupOrderThenQuestionOrder');
673
674 // The questions to display (all question)
#9
unknown(0): statistics->simpleStatistics()
#10
+
/var/www/html/framework/web/actions/CAction.php(109): ReflectionMethod->invokeArgs()
#11
+
/var/www/html/application/core/Survey_Common_Action.php(86): CAction->runWithParamsInternal()
#12
+
/var/www/html/framework/web/CController.php(308): Survey_Common_Action->runWithParams()
#13
+
/var/www/html/framework/web/CController.php(286): CController->runAction()
#14
+
/var/www/html/framework/web/CController.php(265): CController->runActionWithFilters()
#15
+
/var/www/html/application/controllers/AdminController.php(165): CController->run()
#16
+
/var/www/html/framework/web/CWebApplication.php(282): AdminController->run()
#17
+
/var/www/html/framework/web/CWebApplication.php(141): CWebApplication->runController()
#18
+
/var/www/html/framework/base/CApplication.php(185): CWebApplication->processRequest()
#19
+
/var/www/html/index.php(195): CApplication->run()
2020-01-21 20:36:04 Apache/2.4.37 (centos) Yii Framework/1.1.22-dev
Profiling Summary Report (Time: 0.29369s, Memory: 2,671KB)
Procedure Count Total (s) Avg. (s) Min. (s) Max. (s)
system.db.CDbCommand.query(SELECT a.attname, LOWER(format_type(a.atttypid, a.atttypmod)) AS type, pg_get_expr(d.adbin,d.adrelid) as adsrc, a.attnotnull, a.atthasdef, pg_catalog.col_description(a.attrelid, a.attnum) AS comment FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attnum > 0 AND NOT a.attisdropped AND a.attrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname = :schema)) ORDER BY a.attnum. Bound with :table='lime_settings_global', :schema='public') 1 0.03061 0.03061 0.03061 0.03061
system.db.CDbCommand.query(SELECT conname, consrc, contype, indkey FROM ( SELECT conname, CASE WHEN contype='f' THEN pg_catalog.pg_get_constraintdef(oid) ELSE 'CHECK (' || pg_get_expr(conbin, conrelid) || ')' END AS consrc, contype, conrelid AS relid, NULL AS indkey FROM pg_catalog.pg_constraint WHERE contype IN ('f', 'c') UNION ALL SELECT pc.relname, NULL, CASE WHEN indisprimary THEN 'p' ELSE 'u' END, pi.indrelid, indkey FROM pg_catalog.pg_class pc, pg_catalog.pg_index pi WHERE pc.oid=pi.indexrelid AND EXISTS ( SELECT 1 FROM pg_catalog.pg_depend d JOIN pg_catalog.pg_constraint c ON (d.refclassid = c.tableoid AND d.refobjid = c.oid) WHERE d.classid = pc.tableoid AND d.objid = pc.oid AND d.deptype = 'i' AND c.contype IN ('u', 'p') ) ) AS sub WHERE relid = (SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname=:schema)). Bound with :table='lime_settings_global', :schema='public') 1 0.01698 0.01698 0.01698 0.01698
system.db.CDbCommand.query(SELECT FROM "lime_surveys" "t" WHERE "t"."sid"=172177 LIMIT 1) 1 0.01626 0.01626 0.01626 0.01626
system.db.CDbCommand.query(SELECT FROM "lime_users" "t" WHERE "t"."uid"=2 LIMIT 1) 1 0.01202 0.01202 0.01202 0.01202
system.db.CDbCommand.query(SELECT "t"."gsid" AS "t0_c0", "t"."owner_id" AS "t0_c1", "t"."admin" AS "t0_c2", "t"."adminemail" AS "t0_c3", "t"."anonymized" AS "t0_c4", "t"."format" AS "t0_c5", "t"."savetimings" AS "t0_c6", "t"."template" AS "t0_c7", "t"."datestamp" AS "t0_c8", "t"."usecookie" AS "t0_c9", "t"."allowregister" AS "t0_c10", "t"."allowsave" AS "t0_c11", "t"."autonumber_start" AS "t0_c12", "t"."autoredirect" AS "t0_c13", "t"."allowprev" AS "t0_c14", "t"."printanswers" AS "t0_c15", "t"."ipaddr" AS "t0_c16", "t"."refurl" AS "t0_c17", "t"."showsurveypolicynotice" AS "t0_c18", "t"."publicstatistics" AS "t0_c19", "t"."publicgraphs" AS "t0_c20", "t"."listpublic" AS "t0_c21", "t"."htmlemail" AS "t0_c22", "t"."sendconfirmation" AS "t0_c23", "t"."tokenanswerspersistence" AS "t0_c24", "t"."assessments" AS "t0_c25", "t"."usecaptcha" AS "t0_c26", "t"."bounce_email" AS "t0_c27", "t"."attributedescriptions" AS "t0_c28", "t"."emailresponseto" AS "t0_c29", "t"."emailnotificationto" AS "t0_c30", "t"."tokenlength" AS "t0_c31", "t"."showxquestions" AS "t0_c32", "t"."showgroupinfo" AS "t0_c33", "t"."shownoanswer" AS "t0_c34", "t"."showqnumcode" AS "t0_c35", "t"."showwelcome" AS "t0_c36", "t"."showprogress" AS "t0_c37", "t"."questionindex" AS "t0_c38", "t"."navigationdelay" AS "t0_c39", "t"."nokeyboard" AS "t0_c40", "t"."alloweditaftercompletion" AS "t0_c41", "SurveysGroups"."gsid" AS "t1_c0", "SurveysGroups"."name" AS "t1_c1", "SurveysGroups"."title" AS "t1_c2", "SurveysGroups"."template" AS "t1_c3", "SurveysGroups"."description" AS "t1_c4", "SurveysGroups"."sortorder" AS "t1_c5", "SurveysGroups"."owner_id" AS "t1_c6", "SurveysGroups"."parent_id" AS "t1_c7", "SurveysGroups"."created" AS "t1_c8", "SurveysGroups"."modified" AS "t1_c9", "SurveysGroups"."created_by" AS "t1_c10" FROM "lime_surveys_groupsettings" "t" LEFT OUTER JOIN "lime_surveys_groups" "SurveysGroups" ON ("SurveysGroups"."gsid"="t"."gsid") WHERE ("t"."gsid"=1)) 1 0.01112 0.01112 0.01112 0.01112
system.db.CDbCommand.query(SELECT FROM "lime_templates" "t" WHERE "t"."name"='RGL_theme' LIMIT 1) 1 0.01002 0.01002 0.01002 0.01002
system.db.CDbCommand.query(SELECT FROM "lime_permissions" "t" WHERE "t"."entity_id"=:yp0 AND "t"."entity"=:yp1 AND "t"."uid"=:yp2 AND "t"."permission"=:yp3 LIMIT 1. Bound with :yp0=0, :yp1='global', :yp2=2, :yp3='superadmin') 1 0.00615 0.00615 0.00615 0.00615
system.db.CDbCommand.query(SELECT a.attname, LOWER(format_type(a.atttypid, a.atttypmod)) AS type, pg_get_expr(d.adbin,d.adrelid) as adsrc, a.attnotnull, a.atthasdef, pg_catalog.col_description(a.attrelid, a.attnum) AS comment FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attnum > 0 AND NOT a.attisdropped AND a.attrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname = :schema)) ORDER BY a.attnum. Bound with :table='lime_surveys', :schema='public') 1 0.00602 0.00602 0.00602 0.00602
system.db.CDbCommand.query(SELECT FROM "lime_plugins" "t" WHERE "t"."active"=:yp0 ORDER BY priority DESC. Bound with :yp0=1) 1 0.00537 0.00537 0.00537 0.00537
system.db.CDbCommand.query(SELECT conname, consrc, contype, indkey FROM ( SELECT conname, CASE WHEN contype='f' THEN pg_catalog.pg_get_constraintdef(oid) ELSE 'CHECK (' || pg_get_expr(conbin, conrelid) || ')' END AS consrc, contype, conrelid AS relid, NULL AS indkey FROM pg_catalog.pg_constraint WHERE contype IN ('f', 'c') UNION ALL SELECT pc.relname, NULL, CASE WHEN indisprimary THEN 'p' ELSE 'u' END, pi.indrelid, indkey FROM pg_catalog.pg_class pc, pg_catalog.pg_index pi WHERE pc.oid=pi.indexrelid AND EXISTS ( SELECT 1 FROM pg_catalog.pg_depend d JOIN pg_catalog.pg_constraint c ON (d.refclassid = c.tableoid AND d.refobjid = c.oid) WHERE d.classid = pc.tableoid AND d.objid = pc.oid AND d.deptype = 'i' AND c.contype IN ('u', 'p') ) ) AS sub WHERE relid = (SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname=:schema)). Bound with :table='lime_surveys_groupsettings', :schema='public') 1 0.00470 0.00470 0.00470 0.00470
system.db.CDbCommand.query(SELECT a.attname, LOWER(format_type(a.atttypid, a.atttypmod)) AS type, pg_get_expr(d.adbin,d.adrelid) as adsrc, a.attnotnull, a.atthasdef, pg_catalog.col_description(a.attrelid, a.attnum) AS comment FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attnum > 0 AND NOT a.attisdropped AND a.attrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname = :schema)) ORDER BY a.attnum. Bound with :table='lime_surveys_groupsettings', :schema='public') 1 0.00441 0.00441 0.00441 0.00441
system.db.CDbCommand.query(SELECT conname, consrc, contype, indkey FROM ( SELECT conname, CASE WHEN contype='f' THEN pg_catalog.pg_get_constraintdef(oid) ELSE 'CHECK (' || pg_get_expr(conbin, conrelid) || ')' END AS consrc, contype, conrelid AS relid, NULL AS indkey FROM pg_catalog.pg_constraint WHERE contype IN ('f', 'c') UNION ALL SELECT pc.relname, NULL, CASE WHEN indisprimary THEN 'p' ELSE 'u' END, pi.indrelid, indkey FROM pg_catalog.pg_class pc, pg_catalog.pg_index pi WHERE pc.oid=pi.indexrelid AND EXISTS ( SELECT 1 FROM pg_catalog.pg_depend d JOIN pg_catalog.pg_constraint c ON (d.refclassid = c.tableoid AND d.refobjid = c.oid) WHERE d.classid = pc.tableoid AND d.objid = pc.oid AND d.deptype = 'i' AND c.contype IN ('u', 'p') ) ) AS sub WHERE relid = (SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname=:schema)). Bound with :table='lime_plugins', :schema='public') 1 0.00440 0.00440 0.00440 0.00440
system.db.CDbCommand.query(SELECT conname, consrc, contype, indkey FROM ( SELECT conname, CASE WHEN contype='f' THEN pg_catalog.pg_get_constraintdef(oid) ELSE 'CHECK (' || pg_get_expr(conbin, conrelid) || ')' END AS consrc, contype, conrelid AS relid, NULL AS indkey FROM pg_catalog.pg_constraint WHERE contype IN ('f', 'c') UNION ALL SELECT pc.relname, NULL, CASE WHEN indisprimary THEN 'p' ELSE 'u' END, pi.indrelid, indkey FROM pg_catalog.pg_class pc, pg_catalog.pg_index pi WHERE pc.oid=pi.indexrelid AND EXISTS ( SELECT 1 FROM pg_catalog.pg_depend d JOIN pg_catalog.pg_constraint c ON (d.refclassid = c.tableoid AND d.refobjid = c.oid) WHERE d.classid = pc.tableoid AND d.objid = pc.oid AND d.deptype = 'i' AND c.contype IN ('u', 'p') ) ) AS sub WHERE relid = (SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname=:schema)). Bound with :table='lime_templates', :schema='public') 1 0.00411 0.00411 0.00411 0.00411
system.db.CDbCommand.query(SELECT conname, consrc, contype, indkey FROM ( SELECT conname, CASE WHEN contype='f' THEN pg_catalog.pg_get_constraintdef(oid) ELSE 'CHECK (' || pg_get_expr(conbin, conrelid) || ')' END AS consrc, contype, conrelid AS relid, NULL AS indkey FROM pg_catalog.pg_constraint WHERE contype IN ('f', 'c') UNION ALL SELECT pc.relname, NULL, CASE WHEN indisprimary THEN 'p' ELSE 'u' END, pi.indrelid, indkey FROM pg_catalog.pg_class pc, pg_catalog.pg_index pi WHERE pc.oid=pi.indexrelid AND EXISTS ( SELECT 1 FROM pg_catalog.pg_depend d JOIN pg_catalog.pg_constraint c ON (d.refclassid = c.tableoid AND d.refobjid = c.oid) WHERE d.classid = pc.tableoid AND d.objid = pc.oid AND d.deptype = 'i' AND c.contype IN ('u', 'p') ) ) AS sub WHERE relid = (SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname=:schema)). Bound with :table='lime_permissions', :schema='public') 1 0.00388 0.00388 0.00388 0.00388
system.db.CDbCommand.query(SELECT a.attname, LOWER(format_type(a.atttypid, a.atttypmod)) AS type, pg_get_expr(d.adbin,d.adrelid) as adsrc, a.attnotnull, a.atthasdef, pg_catalog.col_description(a.attrelid, a.attnum) AS comment FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attnum > 0 AND NOT a.attisdropped AND a.attrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname = :schema)) ORDER BY a.attnum. Bound with :table='lime_questions', :schema='public') 1 0.00385 0.00385 0.00385 0.00385
system.db.CDbCommand.query(SELECT a.attname, LOWER(format_type(a.atttypid, a.atttypmod)) AS type, pg_get_expr(d.adbin,d.adrelid) as adsrc, a.attnotnull, a.atthasdef, pg_catalog.col_description(a.attrelid, a.attnum) AS comment FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attnum > 0 AND NOT a.attisdropped AND a.attrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname = :schema)) ORDER BY a.attnum. Bound with :table='lime_users', :schema='public') 1 0.00346 0.00346 0.00346 0.00346
system.db.CDbCommand.query(SELECT FROM "lime_settings_global" "t") 1 0.00341 0.00341 0.00341 0.00341
system.db.CDbCommand.query(SELECT conname, consrc, contype, indkey FROM ( SELECT conname, CASE WHEN contype='f' THEN pg_catalog.pg_get_constraintdef(oid) ELSE 'CHECK (' || pg_get_expr(conbin, conrelid) || ')' END AS consrc, contype, conrelid AS relid, NULL AS indkey FROM pg_catalog.pg_constraint WHERE contype IN ('f', 'c') UNION ALL SELECT pc.relname, NULL, CASE WHEN indisprimary THEN 'p' ELSE 'u' END, pi.indrelid, indkey FROM pg_catalog.pg_class pc, pg_catalog.pg_index pi WHERE pc.oid=pi.indexrelid AND EXISTS ( SELECT 1 FROM pg_catalog.pg_depend d JOIN pg_catalog.pg_constraint c ON (d.refclassid = c.tableoid AND d.refobjid = c.oid) WHERE d.classid = pc.tableoid AND d.objid = pc.oid AND d.deptype = 'i' AND c.contype IN ('u', 'p') ) ) AS sub WHERE relid = (SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname=:schema)). Bound with :table='lime_users', :schema='public') 1 0.00328 0.00328 0.00328 0.00328
system.db.CDbCommand.query(SELECT a.attname, LOWER(format_type(a.atttypid, a.atttypmod)) AS type, pg_get_expr(d.adbin,d.adrelid) as adsrc, a.attnotnull, a.atthasdef, pg_catalog.col_description(a.attrelid, a.attnum) AS comment FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attnum > 0 AND NOT a.attisdropped AND a.attrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname = :schema)) ORDER BY a.attnum. Bound with :table='lime_permissions', :schema='public') 1 0.00299 0.00299 0.00299 0.00299
system.db.CDbCommand.query(SELECT a.attname, LOWER(format_type(a.atttypid, a.atttypmod)) AS type, pg_get_expr(d.adbin,d.adrelid) as adsrc, a.attnotnull, a.atthasdef, pg_catalog.col_description(a.attrelid, a.attnum) AS comment FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attnum > 0 AND NOT a.attisdropped AND a.attrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname = :schema)) ORDER BY a.attnum. Bound with :table='lime_plugins', :schema='public') 1 0.00287 0.00287 0.00287 0.00287
system.db.CDbCommand.query(SELECT a.attname, LOWER(format_type(a.atttypid, a.atttypmod)) AS type, pg_get_expr(d.adbin,d.adrelid) as adsrc, a.attnotnull, a.atthasdef, pg_catalog.col_description(a.attrelid, a.attnum) AS comment FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attnum > 0 AND NOT a.attisdropped AND a.attrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname = :schema)) ORDER BY a.attnum. Bound with :table='lime_surveys_groups', :schema='public') 1 0.00265 0.00265 0.00265 0.00265
system.db.CDbCommand.query(SELECT FROM "lime_settings_global" "t" WHERE stg_name=:name LIMIT 1. Bound with :name='DBVersion') 1 0.00265 0.00265 0.00265 0.00265
system.db.CDbCommand.query(SELECT conname, consrc, contype, indkey FROM ( SELECT conname, CASE WHEN contype='f' THEN pg_catalog.pg_get_constraintdef(oid) ELSE 'CHECK (' || pg_get_expr(conbin, conrelid) || ')' END AS consrc, contype, conrelid AS relid, NULL AS indkey FROM pg_catalog.pg_constraint WHERE contype IN ('f', 'c') UNION ALL SELECT pc.relname, NULL, CASE WHEN indisprimary THEN 'p' ELSE 'u' END, pi.indrelid, indkey FROM pg_catalog.pg_class pc, pg_catalog.pg_index pi WHERE pc.oid=pi.indexrelid AND EXISTS ( SELECT 1 FROM pg_catalog.pg_depend d JOIN pg_catalog.pg_constraint c ON (d.refclassid = c.tableoid AND d.refobjid = c.oid) WHERE d.classid = pc.tableoid AND d.objid = pc.oid AND d.deptype = 'i' AND c.contype IN ('u', 'p') ) ) AS sub WHERE relid = (SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname=:schema)). Bound with :table='lime_surveys_groups', :schema='public') 1 0.00237 0.00237 0.00237 0.00237
system.db.CDbCommand.query(SELECT a.attname, LOWER(format_type(a.atttypid, a.atttypmod)) AS type, pg_get_expr(d.adbin,d.adrelid) as adsrc, a.attnotnull, a.atthasdef, pg_catalog.col_description(a.attrelid, a.attnum) AS comment FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attnum > 0 AND NOT a.attisdropped AND a.attrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname = :schema)) ORDER BY a.attnum. Bound with :table='lime_groups', :schema='public') 1 0.00233 0.00233 0.00233 0.00233
system.db.CDbCommand.query(SELECT conname, consrc, contype, indkey FROM ( SELECT conname, CASE WHEN contype='f' THEN pg_catalog.pg_get_constraintdef(oid) ELSE 'CHECK (' || pg_get_expr(conbin, conrelid) || ')' END AS consrc, contype, conrelid AS relid, NULL AS indkey FROM pg_catalog.pg_constraint WHERE contype IN ('f', 'c') UNION ALL SELECT pc.relname, NULL, CASE WHEN indisprimary THEN 'p' ELSE 'u' END, pi.indrelid, indkey FROM pg_catalog.pg_class pc, pg_catalog.pg_index pi WHERE pc.oid=pi.indexrelid AND EXISTS ( SELECT 1 FROM pg_catalog.pg_depend d JOIN pg_catalog.pg_constraint c ON (d.refclassid = c.tableoid AND d.refobjid = c.oid) WHERE d.classid = pc.tableoid AND d.objid = pc.oid AND d.deptype = 'i' AND c.contype IN ('u', 'p') ) ) AS sub WHERE relid = (SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname=:schema)). Bound with :table='lime_surveys', :schema='public') 1 0.00229 0.00229 0.00229 0.00229
system.db.CDbCommand.query(SELECT conname, consrc, contype, indkey FROM ( SELECT conname, CASE WHEN contype='f' THEN pg_catalog.pg_get_constraintdef(oid) ELSE 'CHECK (' || pg_get_expr(conbin, conrelid) || ')' END AS consrc, contype, conrelid AS relid, NULL AS indkey FROM pg_catalog.pg_constraint WHERE contype IN ('f', 'c') UNION ALL SELECT pc.relname, NULL, CASE WHEN indisprimary THEN 'p' ELSE 'u' END, pi.indrelid, indkey FROM pg_catalog.pg_class pc, pg_catalog.pg_index pi WHERE pc.oid=pi.indexrelid AND EXISTS ( SELECT 1 FROM pg_catalog.pg_depend d JOIN pg_catalog.pg_constraint c ON (d.refclassid = c.tableoid AND d.refobjid = c.oid) WHERE d.classid = pc.tableoid AND d.objid = pc.oid AND d.deptype = 'i' AND c.contype IN ('u', 'p') ) ) AS sub WHERE relid = (SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname=:schema)). Bound with :table='lime_questions', :schema='public') 1 0.00227 0.00227 0.00227 0.00227
system.db.CDbCommand.query(SELECT conname, consrc, contype, indkey FROM ( SELECT conname, CASE WHEN contype='f' THEN pg_catalog.pg_get_constraintdef(oid) ELSE 'CHECK (' || pg_get_expr(conbin, conrelid) || ')' END AS consrc, contype, conrelid AS relid, NULL AS indkey FROM pg_catalog.pg_constraint WHERE contype IN ('f', 'c') UNION ALL SELECT pc.relname, NULL, CASE WHEN indisprimary THEN 'p' ELSE 'u' END, pi.indrelid, indkey FROM pg_catalog.pg_class pc, pg_catalog.pg_index pi WHERE pc.oid=pi.indexrelid AND EXISTS ( SELECT 1 FROM pg_catalog.pg_depend d JOIN pg_catalog.pg_constraint c ON (d.refclassid = c.tableoid AND d.refobjid = c.oid) WHERE d.classid = pc.tableoid AND d.objid = pc.oid AND d.deptype = 'i' AND c.contype IN ('u', 'p') ) ) AS sub WHERE relid = (SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname=:schema)). Bound with :table='lime_groups', :schema='public') 1 0.00219 0.00219 0.00219 0.00219
system.db.CDbCommand.query(SELECT attnum, attname FROM pg_catalog.pg_attribute WHERE attrelid=( SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace=( SELECT oid FROM pg_catalog.pg_namespace WHERE nspname=:schema ) ) AND attnum IN (1). Bound with :table='lime_permissions', :schema='public') 1 0.00218 0.00218 0.00218 0.00218
system.db.CDbCommand.query(SELECT a.attname, LOWER(format_type(a.atttypid, a.atttypmod)) AS type, pg_get_expr(d.adbin,d.adrelid) as adsrc, a.attnotnull, a.atthasdef, pg_catalog.col_description(a.attrelid, a.attnum) AS comment FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attnum > 0 AND NOT a.attisdropped AND a.attrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname = :schema)) ORDER BY a.attnum. Bound with :table='lime_templates', :schema='public') 1 0.00171 0.00171 0.00171 0.00171
system.db.CDbCommand.query(SELECT attnum, attname FROM pg_catalog.pg_attribute WHERE attrelid=( SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace=( SELECT oid FROM pg_catalog.pg_namespace WHERE nspname=:schema ) ) AND attnum IN (1). Bound with :table='lime_surveys_groupsettings', :schema='public') 1 0.00101 0.00101 0.00101 0.00101
system.db.CDbCommand.query(SELECT attnum, attname FROM pg_catalog.pg_attribute WHERE attrelid=( SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace=( SELECT oid FROM pg_catalog.pg_namespace WHERE nspname=:schema ) ) AND attnum IN (1). Bound with :table='lime_users', :schema='public') 1 0.00093 0.00093 0.00093 0.00093
system.db.CDbCommand.query(SELECT attnum, attname FROM pg_catalog.pg_attribute WHERE attrelid=( SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace=( SELECT oid FROM pg_catalog.pg_namespace WHERE nspname=:schema ) ) AND attnum IN (1). Bound with :table='lime_templates', :schema='public') 1 0.00092 0.00092 0.00092 0.00092
system.db.CDbCommand.query(SELECT FROM "lime_surveys_groupsettings" "t" WHERE "t"."gsid"=0 LIMIT 1) 1 0.00089 0.00089 0.00089 0.00089
system.db.CDbCommand.query(SELECT attnum, attname FROM pg_catalog.pg_attribute WHERE attrelid=( SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace=( SELECT oid FROM pg_catalog.pg_namespace WHERE nspname=:schema ) ) AND attnum IN (1). Bound with :table='lime_surveys_groups', :schema='public') 1 0.00086 0.00086 0.00086 0.00086
system.db.CDbCommand.query(SELECT attnum, attname FROM pg_catalog.pg_attribute WHERE attrelid=( SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace=( SELECT oid FROM pg_catalog.pg_namespace WHERE nspname=:schema ) ) AND attnum IN (1). Bound with :table='lime_settings_global', :schema='public') 1 0.00081 0.00081 0.00081 0.00081
system.db.CDbCommand.query(SELECT attnum, attname FROM pg_catalog.pg_attribute WHERE attrelid=( SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace=( SELECT oid FROM pg_catalog.pg_namespace WHERE nspname=:schema ) ) AND attnum IN (1). Bound with :table='lime_groups', :schema='public') 1 0.00081 0.00081 0.00081 0.00081
system.db.CDbCommand.query(SELECT attnum, attname FROM pg_catalog.pg_attribute WHERE attrelid=( SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace=( SELECT oid FROM pg_catalog.pg_namespace WHERE nspname=:schema ) ) AND attnum IN (1). Bound with :table='lime_questions', :schema='public') 1 0.00077 0.00077 0.00077 0.00077
system.db.CDbCommand.query(SELECT "t"."qid" AS "t0_c0", "t"."parent_qid" AS "t0_c1", "t"."sid" AS "t0_c2", "t"."gid" AS "t0_c3", "t"."type" AS "t0_c4", "t"."title" AS "t0_c5", "t"."preg" AS "t0_c6", "t"."other" AS "t0_c7", "t"."mandatory" AS "t0_c8", "t"."encrypted" AS "t0_c9", "t"."question_order" AS "t0_c10", "t"."scale_id" AS "t0_c11", "t"."same_default" AS "t0_c12", "t"."relevance" AS "t0_c13", "t"."modulename" AS "t0_c14", "group"."gid" AS "t1_c0", "group"."sid" AS "t1_c1", "group"."group_order" AS "t1_c2", "group"."randomization_group" AS "t1_c3", "group"."grelevance" AS "t1_c4" FROM "lime_questions" "t" LEFT OUTER JOIN "lime_groups" "group" ON ("t"."gid"="group"."gid") WHERE (t.sid=172177) ORDER BY group.group_order DESC, question_order) 1 0.00071 0.00071 0.00071 0.00071
system.db.CDbCommand.query(SELECT attnum, attname FROM pg_catalog.pg_attribute WHERE attrelid=( SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace=( SELECT oid FROM pg_catalog.pg_namespace WHERE nspname=:schema ) ) AND attnum IN (1). Bound with :table='lime_plugins', :schema='public') 1 0.00071 0.00071 0.00071 0.00071
system.db.CDbCommand.query(SELECT * FROM "lime_templates" "t" WHERE "t"."name"='bootswatch' LIMIT 1) 1 0.00070 0.00070 0.00070 0.00070
system.db.CDbCommand.query(SELECT attnum, attname FROM pg_catalog.pg_attribute WHERE attrelid=( SELECT oid FROM pg_catalog.pg_class WHERE relname=:table AND relnamespace=( SELECT oid FROM pg_catalog.pg_namespace WHERE nspname=:schema ) ) AND attnum IN (1). Bound with :table='lime_surveys', :schema='public') 1 0.00069 0.00069 0.00069 0.00069 |