Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel™ v2.6.x
Author Message
Lucifix
Regular
Regular


Joined: Mar 11, 2005
Posts: 67

PostPosted: Thu Sep 11, 2008 1:43 pm Reply with quote

I just found out that some quries in the NukeSentinel are loading quite long. Here is the query witch took 4 seconds to load:

# Query_time: 4 Lock_time: 0 Rows_sent: 1 Rows_examined: 82543
SELECT `c2c` FROM `nuke_nsnst_ip2country` WHERE `ip_lo`<='3557959793' AND `ip_hi`>='3557959793' LIMIT 0,1;

Does anyone have the same problem?
 
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17077

PostPosted: Thu Sep 11, 2008 11:48 pm Reply with quote

Shocked Hmmm. You might want to find another host. My results:
Query took 0.7775 sec
 
View user's profile Send private message
slackervaara
Worker
Worker


Joined: Aug 26, 2007
Posts: 236

PostPosted: Fri Sep 12, 2008 12:05 am Reply with quote

For me it took 0.24 sec.
 
View user's profile Send private message
Raven
PostPosted: Fri Sep 12, 2008 12:14 am Reply with quote

I should add that your results will vary due to server load and processes running at the time but 4 seconds is WAY off the curve.
 
Lucifix
PostPosted: Fri Sep 12, 2008 12:15 am Reply with quote

Well if I run this query manualy query took 0.3170 sec... looks like this is happening only when there is rush on my site.

Guess this isn't the problem in table.

Thx!
 
Lucifix
PostPosted: Fri Sep 12, 2008 12:18 am Reply with quote

hehe raven, just 1 min ahead of me Smile

Why does this query actualy do? Is it for tracking visitors?
 
Raven
PostPosted: Fri Sep 12, 2008 12:38 am Reply with quote

It's used to track IP countries in a couple of scripts.

Try profiling it under phpMyAdmin to see where it's hanging. My last try showed this:

Code:
Status     Time

(initialization)    0.000023
Opening tables    0.000037
System lock    0.000009
Table lock    0.000015
init    0.000011
optimizing    0.000009
statistics    0.000013
preparing    0.000012
executing    0.0000699
Sending data    0.000027
end    0.000009
query end    0.000009
freeing items    0.000014
closing tables    0.000008
removing tmp table    0.000023
closing tables    0.000012
logging slow query    0.000009

id    select_type    table    type    possible_keys    key    key_len    ref    rows    Extra
1    SIMPLE    nuke_nsnst_ip2country    range    PRIMARY    PRIMARY    4    NULL    82969    Using where
 
Lucifix
PostPosted: Fri Sep 12, 2008 4:43 am Reply with quote

I searched for profiling in phpMyAdmin but I can't find it Sad
 
Raven
PostPosted: Fri Sep 12, 2008 7:34 am Reply with quote

Profiling was added in v2.11.0.0 (2007-08-21)

In phpMyAdmin
1. Select your database
2. Select the SQL tab
3. Submit your query
4. The result screen should have a Profiling checkbox

Image

5. Check it
6. Resubmit your query
 
Lucifix
PostPosted: Fri Sep 12, 2008 9:40 am Reply with quote

Thx for explaining me raven, but I have phpMyAdmin version 2.11.6 but i don't see any profiling. I'll check in which version profiling is integrated.
 
Raven
PostPosted: Fri Sep 12, 2008 10:26 am Reply with quote

It was added in v2.11.0.0 (2007-08-21). You may have to activate it; I don't remember.
 
Lucifix
PostPosted: Fri Sep 12, 2008 10:52 am Reply with quote

I'm checking in config.default.php file in includes libraries of phpmyadmin and don't know if this code enables profiling. Are you so kind and check your settings?

These are mine:
Code:
/*******************************************************************************

 * Developers ONLY!
 * To use the following, please install the DBG extension from http://dd.cron.ru/dbg/
 *
 * @global array $cfg['DBG']
 */
$cfg['DBG'] = array();

/**
 * Make the DBG stuff available
 *
 * @global boolean $cfg['DBG']['enable']
 */
$cfg['DBG']['enable'] = false;
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel™ v2.6.x

View next topic
View previous topic
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 can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©