forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: kurt on November 15, 2004, 01:44:56 pm

Title: usrmgr.php Hangs up! Why?
Post by: kurt on November 15, 2004, 01:44:56 pm
I got now ovar 6000 users in my database.
When I click on usermgr.php the script hangs up.

I figured out the this part of the script is to havy for the server:

   # $sql = "SELECT user_id, user_name, UNIX_TIMESTAMP(user_regdate) as user_regdate, UNIX_TIMESTAMP(user_lastvisit) as user_lastvisit, user_active, ".
   #        "COUNT(pid) as pic_count, ROUND(SUM(total_filesize)/1024) as disk_usage, group_name, group_quota ".
   #        "FROM {$CONFIG['TABLE_USERS']} AS u ".
   #        "INNER JOIN {$CONFIG['TABLE_USERGROUPS']} AS g ON user_group = group_id ".
   #        "LEFT JOIN {$CONFIG['TABLE_PICTURES']} AS p ON p.owner_id = u.user_id ".
   #        "GROUP BY user_id ".
   #        "ORDER BY " . $sort_codes[$sort] . " ".
   #        "LIMIT $lower_limit, $user_per_page;";


Any help or update?
Title: Re: usrmgr.php Hangs up! Why?
Post by: Nibbler on November 15, 2004, 02:08:37 pm
Can you verify you have an index on user_id on your users table ?
Title: Re: usrmgr.php Hangs up! Why?
Post by: kurt on November 15, 2004, 02:17:59 pm
user_id is underlined in phpMyAdin. PRIMERY_KEY is user_id.

Hope that is what you wanted to know.

I have changed user_id from INT(11) to bigint(20). Was that the mistake?
Title: Re: usrmgr.php Hangs up! Why?
Post by: Nibbler on November 15, 2004, 02:23:15 pm
I dont know, but seems pretty pointless unless you are expecting more than 2 billion users to sign up for your gallery.

Add an index using

Code: [Select]
ALTER TABLE CPG_pictures ADD INDEX owner_id( `owner_id` );
where CPG_ is your tablename prefix as set on install.
Title: Re: usrmgr.php Hangs up! Why?
Post by: kurt on November 15, 2004, 02:44:55 pm
--> ALTER TABLE cpg132_pictures ADD INDEX owner_id( `owner_id` )

SQL Error Message: Allready exists 'owern_id'
I change BIGINT(20) back into to INT(11).

But it still hangsup. I think that maybe the SQL statement is wrong, or the result is to big, or it take too much time for this query, so an server time out comes.
Title: Re: usrmgr.php Hangs up! Why?
Post by: kurt on November 15, 2004, 02:53:30 pm
OK !!! EXCELLENT!!!

I create a new Index over the user_id on *_users
and one over *_pictures on ownerid!!!

Now it runs!

VERY GOOD SUPPORT HERE!!! THANKS A LOT!