About Conueries


I would like to know how to get the numbers to make a conuery. I am running a local server of my website and I’m trying to make it more efficient and doing so requires being able to obtain an equal amount of information. I would like to know how the data is found and stored so I can duplicate it for testing purposes.


Here you are, from the DreamHost wiki:

and from the DH Newsletter Archive ( March of 2002):

–DreamHost Tech Support


My bad, I didn’t specify enough. I would like to know how to get the number of connections and queries from my server. I know the formula for getting the conuery count, just not where the numbers that make it up come from.


Does no one know how to get these numbers? I’ve been looking around my server and database and I can’t find a way to get the connection or query numbers.


I get them from the panel: Status -> MySQL Usage and then click View Report.



Which would be fine, were I trying to find them on my hosted service, however I am looking for them on my local server (running Apache and MySQL). I assume they are retrieved from the database somehow, but I don’t know the command. I would like to know what is used to get those numbers to be displayed on that report.


My stronger suspicion is that they are in a logfile somewhere. Much like Apache logs where one hit results in a handful of GETs, one connection can result in a handful of queries. I don’t have a logfile at my disposal, so this is just a theory, but I really think there’s a logfile you need to look at. Try looking in /var/log, if you’re running UNIX.



I am sorry for being less than clear on this. From the DreamHost Wiki:

(emphasis mine). It’s not something you can query that database for, and it’s not going to be in any standard log that you are likely to have on your computer. It is a *computed" number that they use in profiling MySQL usage.

If you want to do the same, you will need to arrange to count connections and querys, and use the formula already described to determine the “conueries” you are using. “conueries” don’t exist until you create (derive) them.

–DreamHost Tech Support


I understand that conueries are a computed number. I understand it’s something DreamHost has devised. I stated that I was looking for a way to get the numbers that make it up, the connections and queries. I was NOT asking to have the direct conuery number, I know it’s not in some log somewhere.

Now, after looking through tons of logfiles and searching the MySQL documentation website, I’ve managed to find where those two numbers come from for anyone who happens to have the same problem I did, so they don’t have to spend a few days clarifying their question.
–If you query the database using “SHOW GLOBAL STATUS” You will see a variable called “Connections” and one called “Questions”. These are the two numbers you can use. They are, of course, the total number of connections and queries since database startup, so in order to get a number per day you have to write a script to get the current running number at the beginning of the day and the end of the day and then subtract them.


I understand now! And I’m sorry I misunderstood you before. I’m, also glad you got it worked out and I think it is great you have shared it. Thanks! :slight_smile:

–DreamHost Tech Support