View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
05184Bug reportsOtherpublic2011-06-01 23:43
ReporterTMSWhite Assigned Toc_schmitz  
PrioritylowSeverityminor 
Status closedResolutionfixed 
Product Version1.91 
Fixed in Version1.91+ 
Summary05184: unnecessary duplicate query - could slow down listing of surveys when there are many
Description

Lines 402-409 can be commented out in index.php, as they duplicate the query to list names of active instruments, and risk slow response if there are many active surveys (since this is called in a loop). The lines are:

$result2 = db_execute_assoc("Select surveyls_title from ".db_table_name('surveys_languagesettings')." where surveyls_survey_id={$rows['sid']} and surveyls_language='$baselang'");
if ($result2->RecordCount())
{
$languagedetails=$result2->FetchRow();
$rows['surveyls_title']=$languagedetails['surveyls_title'];
}

Steps To Reproduce

validated that it generates correct listing when comment out these lines (but I don't yet know how to submit a patch).

Additional Information

If not commenting this out, perhaps the main query on the prior lines should be updated to have survey_language='$baselang' to avoid issuing multiple queries to the database.

TagsNo tags attached.
Bug heat2
Complete LimeSurvey version number (& build)10103
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMysql
Server OS (if known)Windows XP
Webserver software & version (if known)Apache 2
PHP Version5

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2011-05-28 18:43

administrator   ~15144

Fixed in rev 10138

c_schmitz

c_schmitz

2011-05-28 18:43

administrator   ~15145

Thank you very much!

c_schmitz

c_schmitz

2011-06-01 23:43

administrator   ~15233

New version released.

Issue History

Date Modified Username Field Change
2011-05-20 00:19 TMSWhite New Issue
2011-05-20 12:24 c_schmitz Assigned To => c_schmitz
2011-05-20 12:24 c_schmitz Status new => assigned
2011-05-28 18:43 c_schmitz Note Added: 15144
2011-05-28 18:43 c_schmitz Status assigned => resolved
2011-05-28 18:43 c_schmitz Fixed in Version => 1.91+
2011-05-28 18:43 c_schmitz Resolution open => fixed
2011-05-28 18:43 c_schmitz Note Added: 15145
2011-06-01 23:43 c_schmitz Note Added: 15233
2011-06-01 23:43 c_schmitz Status resolved => closed