View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
06454 | Bug reports | Survey participants (Tokens) | public | 2012-08-09 09:54 | 2012-11-30 09:16 |
Reporter | lolo | Assigned To | mdekker | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | duplicate | ||
Product Version | 2.00RC8 | ||||
Fixed in Version | 2.00+ | ||||
Summary | 06454: Central Participant Database: Sorting of participants in grid is local only | ||||
Description | In the list of participants (jqGrid), the column sorting is local to the displayed items only and not to the whole list of participants. For instance, if sorting by first name, and with a total number of participants higher than the current display size (25 items by default), each screen may contain items from A to Z. Best would be to sort items first (while fetching items from database), then paginate. Currently the process is the other way round (paginate first, then sort). From a technical standpoint, it should be possible to perform thoses tasks at database level (sorting and pagination) without the need to have all elements in memory. | ||||
Steps To Reproduce |
| ||||
Tags | No tags attached. | ||||
Bug heat | 8 | ||||
Complete LimeSurvey version number (& build) | 120803 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | Mozilla 14.0.1 (Win) | ||||
Database type & version | Mysql 5.5.24 | ||||
Server OS (if known) | Linux 2.6.27.52 | ||||
Webserver software & version (if known) | Apache 2 | ||||
PHP Version | 5.3.14 | ||||
This is a known issue, and something I'm leaving for future releases. The attributes are not stored in the same table but rather stored vertically in the attribute_values table. This is an efficient storage method for an unlimited number of attributes, but is not so efficient for simple retrieval and sorting tasks. Since sorting cannot be done at the database end, and instead needs to happen after retrieval by the scripts. I want to investigate different methods of managing this. |
|
I guess a query like the following could be used. It does the sorting and the pagination in a single SQL query (example with 2 attributes only): select p.*, a1.value as 'attr1', a2.value as 'attr2' Of course the list of attributes (names and ids) has to be fetched beforehand in a separate query in order to build the list of columns to select (and tables to join with). Hope it can give you ideas... |
|
Awesome, thanks @lolo - since the sorting is only ever done by one column - we could just do one join like this for the column being sorted and keep collecting the remainder of the data the other way. :-) |
|
Glad to be helpful. |
|
Fixed it in another bug that i related so marking the original that I missed as duplicate. Searching is still to be fixed, but there is another bug open for that. The fixes are not released yet so if you want to test, please check out the latest source on github. Feel free to reopen or comment on the other bugreport (6956). |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2012-08-09 09:54 | lolo | New Issue | |
2012-08-09 12:38 | c_schmitz | Assigned To | => jcleeland |
2012-08-09 12:38 | c_schmitz | Status | new => assigned |
2012-08-09 15:05 | jcleeland | Note Added: 20310 | |
2012-08-09 18:27 | lolo | Note Added: 20319 | |
2012-08-10 01:43 | jcleeland | Note Added: 20326 | |
2012-08-10 11:23 | lolo | Note Added: 20335 | |
2012-10-10 10:12 | lolo | Issue Monitored: lolo | |
2012-11-20 20:18 | machaven | Assigned To | jcleeland => machaven |
2012-11-30 09:12 | mdekker | Relationship added | related to 06956 |
2012-11-30 09:16 | mdekker | Note Added: 22724 | |
2012-11-30 09:16 | mdekker | Status | assigned => closed |
2012-11-30 09:16 | mdekker | Assigned To | machaven => mdekker |
2012-11-30 09:16 | mdekker | Resolution | open => duplicate |
2012-11-30 09:16 | mdekker | Fixed in Version | => 2.00+ |
2016-12-08 10:39 | c_schmitz | Category | Tokens => Survey participants (Tokens) |
2021-08-02 23:04 | guest | Bug heat | 6 => 8 |