Issue Details (XML | Word | Printable)

Key: MDL-16641
Type: Improvement Improvement
Status: Reopened Reopened
Priority: Major Major
Assignee: Petr Skoda
Reporter: Wen Hao Chuang
Votes: 5
Watchers: 8
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Remove all attempts to cast sesskey to BINARY as it was causing MySQL to ignore the preferred index, resulting in slow response time

Created: 24/Sep/08 12:51 AM   Updated: 21/Oct/09 04:17 PM
Return to search
Component/s: Lib, Performance
Affects Version/s: 1.8, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.8.6, 1.8.7, 1.8.8, 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4
Fix Version/s: 1.9.7

Issue Links:
Relates
 

Database: MySQL
Participants: Dakota Duff, Elvedin Trnjanin, Martin Dougiamas, Petr Skoda and Wen Hao Chuang
Security Level: None
Difficulty: Easy
Resolved date: 06/Jan/09
Affected Branches: MOODLE_18_STABLE, MOODLE_19_STABLE
Fixed Branches: MOODLE_19_STABLE


 Description  « Hide
Our team (at SFSU) talked to the MySQL support (we have subscribed to their enterprise level support) and they suggested that we look into the codes and remove all attempts to cast sesskey to BINARY, as it will cause MySQL to ignore the preferred index and not use an index at all, resulting in slow response time. So we dig into the codes and did the following changes

in /lib/adodb/session/adodb-session.php (and adodb-session2.php in the same directory)

replace

$binary = $conn->dataProvider === 'mysql' ? '/*! BINARY */' : '';

to

$binary = $conn->dataProvider === 'mysql' ? '' : '';

This has dramatically improved the performance on our production site. However, would like to hear people's opinion about this change (also emailed Martin D, Martin L, and the author of ADODB already, but haven't heard back from them yet). Maybe the core could consider this change too. Also see the discussion thread that our system administrator Taylor posted here for more details:

http://moodle.org/mod/forum/discuss.php?d=106108

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
No commits have yet been performed on this issue.