Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / number of database connections and queries - slow on godaddy hosting

number of database connections and queries - slow on godaddy hosting

Locked

Started by neit on 13 Aug 2010, 7:28 AM · Views: 2,671

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
13 Aug 2010, 7:28 AM
#1
neit avatar

neit

Zen Follower

Join Date:
Feb 2010
Posts:
140
Plugin Contributions:
0

Post #1 by neit

I have shop setup and would like to know the number of
database connections and queries that the main index page
makes to a database.

I have only three side boxes showing:
information, currencies and a side banner box.

13 Aug 2010, 7:33 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Post #2 by kobra

Querries
admin > config > Logging > Display The Page Parse Time > set to true

Index & others only require one connection

Zen-Venom Get Bitten

13 Aug 2010, 8:47 AM
#3
neit avatar

neit

Zen Follower

Join Date:
Feb 2010
Posts:
140
Plugin Contributions:
0

Post #3 by neit

ok thankyou.
Having performance issues thats why I wanted to check and my isp advised
You also appear to be using the grid based hosting so the site should not be impacted by the available resources. The exception to this would be database connections. If the number of queries or activity were to increase, it is conceivable that the resources associated with the database are taxed. I can only recommend reviewing the structure to ensure it is indexed and optimized.

13 Aug 2010, 10:51 AM
#4
neit avatar

neit

Zen Follower

Join Date:
Feb 2010
Posts:
140
Plugin Contributions:
0

Post #4 by neit

These are some of the results I am getting back from the
queries and parse times:

index page 1st load
Parse Time: 34.831 - Number of Queries: 38 - Query Time: 28.156374772797

index page 2nd load:
Parse Time: 13.887 - Number of Queries: 28 - Query Time: 9.7750679123383

index page 3rd load:
Parse Time: 35.013 - Number of Queries: 28 - Query Time: 24.851535070175

advance search results page:
Parse Time: 126.172 - Number of Queries: 206 - Query Time: 119.52104957492

I have 15000 products in the system.

The number of times I have did an advance search the number
of queries has changed. One came back with 134 queries and
this one 206 why?

13 Aug 2010, 11:54 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #5 by drbyte

Yikes! Those are INSANELY slow responses from your MySQL server.
Running hundreds of queries should happen in under 1/4 second.

The query time is the amount of time it's taking for your MySQL engine to send back the data.
The parse time is the combined query time (waiting on the database) plus the time the server takes to process the PHP scripts and prepare the HTML content that's sent to the browser. That also includes the time it takes for the server to look for relevant .php files to run.

You're also showing rather slow parse times, which might be a result of slow server disk speed, overloaded CPU (common with "overselling" hosts that put too many customers on one server just to line their pockets with cash), or poorly configured cluster servers where the access to the filesystem is external thus causing lag.

In short, your hosting service is running VERY poorly.

You will find variation on number of queries used on each page based on which randomly selected products appear in various boxes based upon your configuration of the store, as well as products on sale/special, banners being displayed, etc. That variation is normal.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

13 Aug 2010, 1:55 PM
#6
neit avatar

neit

Zen Follower

Join Date:
Feb 2010
Posts:
140
Plugin Contributions:
0

Post #6 by neit

I only have to 3 boxes enabled.
information which pulls out 1 link
currencies which pulls out 2 currencies
side promotion box with the same image all the time.

I have written a small piece of custom code
which passes a string to the search page to return a list of product
titles that match the string. I would expect to have the same number
of queries each time (i know the more products the longer the
search).

The hosting is godaddy (i know they don't have the best rep),
they advised i am grid hosting I suppose thats the same as cluster servers. The non-zencart part of the site appears to run ok.
You can view it at http://www.mtecbrakes.co.uk/store/ the issue appears to intermitant.
So i have sent off another support email to see what they say.

14 Aug 2010, 6:33 AM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #7 by drbyte

I can almost guarantee they'll do nothing to help you, other than to upsell you to a more expensive service ... which will turn out to be just as bad.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

16 Aug 2010, 1:40 PM
#8
neit avatar

neit

Zen Follower

Join Date:
Feb 2010
Posts:
140
Plugin Contributions:
0

Post #8 by neit

needed to supply them with further information on the issue so waitng for them to get back to me.
As for them doing nothing I will just have to wait and see.

16 Aug 2010, 5:02 PM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #10 by drbyte

Exactly as expected. Their problems are so bad they can't fix it (and/or don't care), so they're trying to deflect the attention elsewhere.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.