Mysql Performance Issues With Yii 1.1


I would like to know if many experience this problem with Yii 1 please.

I am in phpmyadmin right now and see this:

Aborted clientsDocumentation 4.5 k The number of connections that were aborted because the client died without closing the connection properly.

Aborted connectsDocumentation 18.4 k The number of failed attempts to connect to the MySQL server.

Handler read rndDocumentation 53.6 M The number of requests to read a row based on a fixed position. This is high if you are doing a lot of queries that require sorting of the result. You probably have a lot of queries that require MySQL to scan whole tables or you have joins that don’t use keys properly.

Handler read rnd nextDocumentation 1.7 G The number of requests to read the next row in the data file. This is high if you are doing a lot of table scans. Generally this suggests that your tables are not properly indexed or that your queries are not written to take advantage of the indexes you have.

The numbers are in red. I thought Yii was built in a way that the connections are closing after each query, is it not the case?

Could anyone give me a bit of help on this please?

Thank you,


Two questions:

  1. Is you Yii app working fine? (I mean, is connecting and querying the DB correctly?)

  2. Are your tables using indices?


The first two are likely not related to Yii at all. The last two are probably due to your schema design. Is that your production server?

Thank you for the reply.

Yes it isconnecting fine.

Strangely the site is locked via htaccess and we still see 600mb of ram being used but the cpu shows 0 usage…i contacted my isp and they said that there is nothing wrong with the server…



Oh, are you sitting on a shared webhost? In that case those numbers are meaningless.

I see…thanks:-)

But even the one for mysql in phpmyadmin?

Yes, even that one. If there is more on that database server than your own app, it is entirely impossible to isolate what is being caused by you. Those numbers are something you should inspect on either your development, staging or dedicated production server, not on a shared webhost.

In fact perhaps i should only check the overheads on mysql itself for this database.

Thanks again:-)