0
votes

i need a simple help..... on my hosting they have recently added a limit for the queries/hours and my problem is that i have a couple of magentos installation with over 10k products... for the import i use Magmi and i saw that it has the stats when import... so what i want to know which of theese numbers are the actual query executed ( if there is)

Global Stats
Imported            Elapsed     Recs/min    Attrs/min   Last 0.5%
3204 items (100%)   29.4436            6530          398330          0.0721

DB Stats
Requests     Elapsed        Speed                 Avg Reqs  Efficiency  Last 0.5%
70414            17.0054    248441 reqs/min       21.98/item  57.76%      198 reqs

thank you in advance.

Fabio

1
DB Stats Requests should be the number you're looking for, though if you're being limited by the queries per hour, it's a useless number as Magento itself will generate an overwhelming majority that is many times this number. More important is "Does your hosting provider give you a statistics section in their control panel that tells you your current queries per hour?" You will either need to use that number or access to SSH so you can use a command line query to MySQL for a stats listing so you can monitor this number and then make the decision to ditch this hosting provider.Fiasco Labs
actually in my CP i don't have such stats(though it's a cpanel) so my only choice will be checking from the mysql via ssh.... do you perhaps know which command is it?Aliceiw

1 Answers

0
votes

One thing to keep in mind, implement all the caching you possibly can. HTML blocks caching, APC cache, full page caching (third party module required if you're not on Enterprise) all cache data retrieved from the database. If you're pulling it from cache, you don't need to hit the database till the data needs to be refreshed. This makes the site more responsive and is a win all round.

At the command line in SSH, you can issue the command:

mysqladmin status -u dbuser -pdbpass

dbuser and dbpass being your mysql user and password. It will kick back a line:

Uptime: 1878  Threads: 1  Questions: 8341  Slow queries: 2  Opens: 8525  Flush tables: 1  Open tables: 512  Queries per second avg: 4.441

This gives you your server uptime and average queries per second. This server should have processed approximately 8340 queries in the time the server was up (uptime x queries per sec)

Another way to see what's going on is to use mysql itself

mysql -u dbuser -pdbpass dbname -Bse "show status like 'uptime';"
mysql -u dbuser -pdbpass dbname -Bse "show status like 'queries';"

You could then set up a cron that logs the queries status entry every hour and the queries per hour are the current total queries minus the previous total queries.