MySQL query on modifyalb.php is taking abaout 10 seconds
| Author |
Message |
greenday2k


Joined: Aug 11, 2005 Posts: 484 Location: CO
|
Post subject: MySQL query on modifyalb.php is taking abaout 10 seconds Posted: Wed Apr 22, 2009 3:09 am |
|
This query used at least on the modify album on coppermine
is taking 10 seconds each time. Ive copied the query and executed on phpMyAdmin and it executed on: 10.6091
On site:
10.6443 - LINE 329:
modules/coppermine/modifyalb.php
Code:
SELECT aid, IF(username IS NOT NULL, CONCAT('(', username, ') ', title), CONCAT(' - ', title)) AS title FROM cms_cpg_albums AS a LEFT JOIN cms_users AS u ON category = (10000 + user_id) ORDER BY title
Also the same query was executed on 10 seconds after the database was optimizated.
Any clues?
Will a purge on users table make this query faster?
cms_users has 19,208 records. (19,208 reg users)
_________________ www.greenday2k.net


greenday2k's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
 |
|
| Back to top |
|
 |
greenday2k


Joined: Aug 11, 2005 Posts: 484 Location: CO
|
Post subject: Re: MySQL query on modifyalb.php is taking abaout 10 seconds Posted: Wed Apr 22, 2009 3:16 am |
|
function alb_list_box() {
global $db,$CONFIG, $album, $CPG_URL, $file, $module_name;
if (GALLERY_ADMIN_MODE) {
$sql = "SELECT aid, IF(username IS NOT NULL, CONCAT('(', username, ') ', title), CONCAT(' - ', title)) AS title " . "FROM {$CONFIG['TABLE_ALBUMS']} AS a " . "LEFT JOIN {$CONFIG['TABLE_USERS']} AS u ON category = (" . FIRST_USER_CAT . " + user_id) " . "ORDER BY title";
$result = $db->sql_query($sql, false,__FILE__,__LINE__);
} else {
$result = $db->sql_query("SELECT aid, title FROM {$CONFIG['TABLE_ALBUMS']} WHERE category = '" . (FIRST_USER_CAT + USER_ID) . "' ORDER BY title", false,__FILE__,__LINE__);
}
_________________ www.greenday2k.net


greenday2k's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
 |
|
| Back to top |
|
 |
greenday2k


Joined: Aug 11, 2005 Posts: 484 Location: CO
|
Post subject: Re: MySQL query on modifyalb.php is taking abaout 10 seconds Posted: Wed Apr 22, 2009 3:24 am |
|
Never mind, updated file to version 9.5
issues solved, is time to update my site xD
_________________ www.greenday2k.net


greenday2k's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
 |
|
| Back to top |
|
 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|

|
User Info ![Show/hide content [x]](themes/dragonfly/images/minus.png)
 Welcome Anonymous
Last CVS commits ![Show/hide content [x]](themes/dragonfly/images/minus.png)
Languages ![Show/hide content [x]](themes/dragonfly/images/minus.png)
Community ![Show/hide content [x]](themes/dragonfly/images/minus.png)
 Support for DragonflyCMS in a other languages:
• Deutsch
• Español
X-links ![Show/hide content [x]](themes/dragonfly/images/minus.png)
Preview theme ![Show/hide content [x]](themes/dragonfly/images/minus.png)
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.
|