MySQL query on modifyalb.php is taking abaout 10 seconds
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexCoppermine
Author Message
greenday2k
Forum Admin


Joined: Aug 11, 2005
Posts: 484
Location: CO

PostPost subject: MySQL query on modifyalb.php is taking abaout 10 seconds
Posted: Wed Apr 22, 2009 3:09 am
Reply with quote

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
View user's profile Visit poster's website MSN Messenger Yahoo Messenger
greenday2k
Forum Admin


Joined: Aug 11, 2005
Posts: 484
Location: CO

PostPost subject: Re: MySQL query on modifyalb.php is taking abaout 10 seconds
Posted: Wed Apr 22, 2009 3:16 am
Reply with quote

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
View user's profile Visit poster's website MSN Messenger Yahoo Messenger
greenday2k
Forum Admin


Joined: Aug 11, 2005
Posts: 484
Location: CO

PostPost subject: Re: MySQL query on modifyalb.php is taking abaout 10 seconds
Posted: Wed Apr 22, 2009 3:24 am
Reply with quote

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
View user's profile Visit poster's website MSN Messenger Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexCoppermine All times are GMT
Page 1 of 1


Jump to:  
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

Dedicated Server & Bandwidth Sponsored by DedicatedNOW
User Info [x]

Welcome Anonymous

Nickname
Password
(Register)

Last CVS commits [x]

Languages [x]

Community [x]

Support for DragonflyCMS in a other languages:

Deutsch
Español

X-links [x]
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

Preview theme [x]
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.


You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
This page generated in 0.4143 seconds with 17 DB Queries in 0.1381 seconds
Memory Usage: 3.02 MB
Interactive software released under GNU GPL, Code Credits, Privacy Policy