Re: Database query execution times in Python?

2009-08-19 Thread Aahz
In article mailman.108.1250247672.2903.python-l...@python.org,
pwnedd  keith.hugh...@gmail.com wrote:

 Look up EXPLAIN

Thanks for the suggestion. I don't see any option to have EXPLAIN display
the query time though?

My suggestion was partly a gentle push toward a database forum to get
more information -- this isn't really a Python question.  Unless all you
want to do is get the wall-clock time, in which case just use
time.time().
-- 
Aahz (a...@pythoncraft.com)   * http://www.pythoncraft.com/

Given that C++ has pointers and typecasts, it's really hard to have a
serious conversation about type safety with a C++ programmer and keep a
straight face.  It's kind of like having a guy who juggles chainsaws
wearing body armor arguing with a guy who juggles rubber chickens wearing
a T-shirt about who's in more danger.  --Roy Smith
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Database query execution times in Python?

2009-08-14 Thread pwnedd

 Look up EXPLAIN

Thanks for the suggestion. I don't see any option to have EXPLAIN display
the query time though?

-- 
View this message in context: 
http://www.nabble.com/Database-query-execution-times-in-Python--tp24870050p24969867.html
Sent from the Python - python-list mailing list archive at Nabble.com.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Database query execution times in Python?

2009-08-13 Thread Aahz
In article mailman.4437.1249670565.8015.python-l...@python.org,
pwnedd  keith.hugh...@gmail.com wrote:

I've been writing some code using libraries based on the Python Database API
2.0 (MySQLdb  pg), and so far things are working really well. There is one
thing that I have not been able to figure out how to do, however: 

Retrieve the time is took a given query to execute.

Look up EXPLAIN
-- 
Aahz (a...@pythoncraft.com)   * http://www.pythoncraft.com/

...string iteration isn't about treating strings as sequences of strings, 
it's about treating strings as sequences of characters.  The fact that
characters are also strings is the reason we have problems, but characters 
are strings for other good reasons.  --Aahz
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Database query execution times in Python?

2009-08-08 Thread Kushal Kumaran
On Sat, Aug 8, 2009 at 12:12 AM, pwneddkeith.hugh...@gmail.com wrote:

 Hi all,

 I've been writing some code using libraries based on the Python Database API
 2.0 (MySQLdb  pg), and so far things are working really well. There is one
 thing that I have not been able to figure out how to do, however:

 Retrieve the time is took a given query to execute.

 Does anyone know if this is possible?


If nothing else, you could always use the time.time() function for
timing sections of code.  This will also include the time it took to
transport the result from the database to your application, though.

-- 
kushal
-- 
http://mail.python.org/mailman/listinfo/python-list


Database query execution times in Python?

2009-08-07 Thread pwnedd

Hi all,

I've been writing some code using libraries based on the Python Database API
2.0 (MySQLdb  pg), and so far things are working really well. There is one
thing that I have not been able to figure out how to do, however: 

Retrieve the time is took a given query to execute.

Does anyone know if this is possible?

Any help would be greatly appreciated.

Thanks!
Keith


-- 
View this message in context: 
http://www.nabble.com/Database-query-execution-times-in-Python--tp24870050p24870050.html
Sent from the Python - python-list mailing list archive at Nabble.com.

-- 
http://mail.python.org/mailman/listinfo/python-list