Re: Mysql Ping and performance

2008-11-02 Thread bo
Would it be wise to suggest that it be removed from the django core given the connection drops every request? It's not done for Postgres at all and the Oracle base.py is doing what you suggest. I guess this question would be posed to whomever controls that slice of the django pie. bo On Nov 2

Re: Mysql Ping and performance

2008-11-02 Thread Jesse Young
Oh, I forgot to mention that this is certainly a Django issue and not a mysqldb issue. The relevant code is in django/db/backends/mysql/ base.py:232: def _valid_connection(self): if self.connection is not None: try: self.connection.ping() re

Re: Mysql Ping and performance

2008-11-02 Thread Jesse Young
Yeah, we found the ping() during performance profiling too. It's a significant performance hit -- it basically doubles the number of requests to the DB server. It seems that the reason is to support use cases where the DB connection is long-lived, since sometimes DB connections die if you leave th

Mysql Ping and performance

2008-10-31 Thread bo
Not sure if this is a Django issue or the supporting Mysqldb (1.2.2) python package .. (i'll stop this here if its not, but it seems worthy of at least letting other know this) however while profiling a page i came across this seemingly performance hole. Ordered by: internal time