Previous Thread
Next Thread
Print Thread
Hop To
#220331 12/17/2008 10:26 PM
Joined: Nov 2007
Posts: 24
E
EJH
Offline
stranger
stranger
E Offline
Joined: Nov 2007
Posts: 24
I just upgraded to 7-4-1, a few days later my hosting company suspended my site. I was informed by my host that the site has a mysql slow queries problem. I have to admit, I have no idea what this means?

My host says it's a problem with the ubb software--says my account will remain frozen until I have it optimized. ?? Below is just a sample of what in my mysql_slow_queries folder.

Help!

# Mon Dec 15 18:00:04 2008
# Query_time: 491 Lock_time: 240 Rows_sent: 1 Rows_examined: 1
use ascensio_gravsportsice07;
SELECT t2.USER_TIME_OFFSET,t2.USER_TOPIC_VIEW_TYPE,t2.USER_TIME_FORMAT, t1.USER_ID, t1.USER_DISPLAY_NAME, t1.USER_PASSWORD, t1.USER_SESSION_ID, t1.USER_MEMBERSHIP_LEVEL, t1.USER_IS_BANNED,t1.USER_RULES_ACCEPTED, t1.USER_IS_UNDERAGE, t2.USER_TOTAL_PM, t2.USER_STYLE, t2.USER_HIDE_LEFT_COLUMN,t2.USER_HIDE_RIGHT_COLUMN, t2.USER_LANGUAGE, t2.USER_MOOD, t2.USER_RELATIVE_TIME, t2.USER_TIME_OFFSET,t2.USER_SHOW_ALL_GRAEMLINS, t2.USER_AVATAR, t2.USER_TITLE, t2.USER_CUSTOM_TITLE, t2.USER_NAME_COLOR, t2.USER_SHOW_LEFT_MYSTUFF
FROM ubbt_USERS as t1,
ubbt_USER_PROFILE as t2
WHERE t1.USER_ID = 341
AND t1.USER_ID = t2.USER_ID

# Mon Dec 15 18:00:05 2008
# Query_time: 838 Lock_time: 582 Rows_sent: 0 Rows_examined: 0
use ascensio_gravsportsice07;
SELECT t2.USER_TOPIC_VIEW_TYPE, t2.USER_TIME_FORMAT, t2.USER_TOPICS_PER_PAGE, t1.USER_ID, t1.USER_DISPLAY_NAME, t1.USER_PASSWORD, t1.USER_SESSION_ID, t1.USER_MEMBERSHIP_LEVEL, t1.USER_IS_BANNED,t1.USER_RULES_ACCEPTED, t1.USER_IS_UNDERAGE, t2.USER_TOTAL_PM, t2.USER_STYLE, t2.USER_HIDE_LEFT_COLUMN,t2.USER_HIDE_RIGHT_COLUMN, t2.USER_LANGUAGE, t2.USER_MOOD, t2.USER_RELATIVE_TIME, t2.USER_TIME_OFFSET,t2.USER_SHOW_ALL_GRAEMLINS, t2.USER_AVATAR, t2.USER_TITLE, t2.USER_CUSTOM_TITLE, t2.USER_NAME_COLOR, t2.USER_SHOW_LEFT_MYSTUFF
FROM ubbt_USERS as t1,
ubbt_USER_PROFILE as t2
WHERE t1.USER_ID = 0
AND t1.USER_ID = t2.USER_ID

# Mon Dec 15 18:00:05 2008
# Query_time: 238 Lock_time: 218 Rows_sent: 0 Rows_examined: 0
use ascensio_gravsportsice07;
update ubbt_USERS
set USER_SESSION_ID = '381a4c3e139cd966cef9407ab2419a9a'
where USER_ID = 341

Last edited by EJH; 12/17/2008 10:50 PM.
EJH #220333 12/17/2008 10:54 PM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Those queries are simple select queries, there really is no reason for them to take that long at all. The USER_ID field is the primary key in those tables so they should be fast. I'd say there is a bit more going on than they are saying.

If you can at least get access to phpmyadmin, then what you can do is run that exact query and put an EXPLAIN at the front and then post it here. That will show if it's using the index or not. So what you'd do is run it like this:

SQL Query
EXPLAIN SELECT t2.USER_TIME_OFFSET,t2.USER_TOPIC_VIEW_TYPE,t2.USER_TIME_FORMAT, t1.USER_ID, t1.USER_DISPLAY_NAME, t1.USER_PASSWORD, t1.USER_SESSION_ID, t1.USER_MEMBERSHIP_LEVEL, t1.USER_IS_BANNED,t1.USER_RULES_ACCEPTED, t1.USER_IS_UNDERAGE, t2.USER_TOTAL_PM, t2.USER_STYLE, t2.USER_HIDE_LEFT_COLUMN,t2.USER_HIDE_RIGHT_COLUMN, t2.USER_LANGUAGE, t2.USER_MOOD, t2.USER_RELATIVE_TIME, t2.USER_TIME_OFFSET,t2.USER_SHOW_ALL_GRAEMLINS, t2.USER_AVATAR, t2.USER_TITLE, t2.USER_CUSTOM_TITLE, t2.USER_NAME_COLOR, t2.USER_SHOW_LEFT_MYSTUFF
FROM ubbt_USERS as t1,
ubbt_USER_PROFILE as t2
WHERE t1.USER_ID = 341
AND t1.USER_ID = t2.USER_ID

Rick #220334 12/17/2008 11:07 PM
Joined: Nov 2007
Posts: 24
E
EJH
Offline
stranger
stranger
E Offline
Joined: Nov 2007
Posts: 24
Rick, here's what the query returned:
SQL query:

EXPLAIN SELECT t2.USER_TIME_OFFSET, t2.USER_TOPIC_VIEW_TYPE, t2.USER_TIME_FORMAT, t1.USER_ID, t1.USER_DISPLAY_NAME, t1.USER_PASSWORD, t1.USER_SESSION_ID, t1.USER_MEMBERSHIP_LEVEL, t1.USER_IS_BANNED, t1.USER_RULES_ACCEPTED, t1.USER_IS_UNDERAGE, t2.USER_TOTAL_PM, t2.USER_STYLE, t2.USER_HIDE_LEFT_COLUMN, t2.USER_HIDE_RIGHT_COLUMN, t2.USER_LANGUAGE, t2.USER_MOOD, t2.USER_RELATIVE_TIME, t2.USER_TIME_OFFSET, t2.USER_SHOW_ALL_GRAEMLINS, t2.USER_AVATAR, t2.USER_TITLE, t2.USER_CUSTOM_TITLE, t2.USER_NAME_COLOR, t2.USER_SHOW_LEFT_MYSTUFF
FROM ubbt_USERS AS t1, ubbt_USER_PROFILE AS t2
WHERE t1.USER_ID =341
AND t1.USER_ID = t2.USER_ID

id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 const PRIMARY PRIMARY 4 const 1

????

EJH #220335 12/17/2008 11:14 PM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Ok, so what you should do is send that to your host. If they are somewhat knowledgeable in MySQL then they should be able to read that ok and see that it's not a software issue with those queries taking so long.

Basically, it's saying that it's using the Primary key index on both tables and it's only having to examine 1 row to find the result. If the last number was large, then we'd be looking at an issue since that means it has to examine multiple rows to find the result.

There most be other things going on with that MySQL server contributing to the slowdowns. If you're on a shared server then that could be part of it.

Rick #220336 12/17/2008 11:31 PM
Joined: Nov 2007
Posts: 24
E
EJH
Offline
stranger
stranger
E Offline
Joined: Nov 2007
Posts: 24
On the phone with hosting company now...
Hopefully this is easily resolved.

Thanks you VERY much Rick!!

EJH


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
0 members (), 868 guests, and 467 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)