spikesource hints'n'tips

Our Top Tags

                                       

Mailing List

Keep uptodate with the latest hints'n' tips as they are published by signing up to our mailing list.

Our RSS Feeds








Latest Linux News

Free Software in Education

Sunday, 24 May 2009
Free Software: "Free Software is political because it is strongly tied with a deep political question: that of education, and access to it."

A Great Multi-Platform Music Management Application: Jajuk

Sunday, 24 May 2009
Web Upd8: "Jajuk is a very comprehensive and feature rich Open Source music management software written in Java. The software program is therefore available for Windows, Linux and Apple Macintosh comp

Kiwi Imaging System - Forge your own operating system images in a matter of hours

Saturday, 23 May 2009
Dedoimedo: "Would you like to be able to create custom, ready-to-use operating system images that can be used as VMware images, Xen virtual machines or live DVDs or booted from USB sticks? Would you l

Linux Myth: No Simple, Easy Database Software

Saturday, 23 May 2009
The ERACC Web Log: "In this installment of my Linux Myth series I take aim at the GNU/Linux database nay-sayers, and shoot them down."

Finding the right open-source savvy lawyer

Saturday, 23 May 2009
Practical Technology: "Some days, like it or not, you need a lawyer. For most business purposes, picking the right law firm isn’t usually that big of a deal"

Latest Digg Entries

Putting a MySQL query to sleep

posted Tuesday, 10 October 2006

Have you ever wanted to put a query to sleep for a while on a running database?  Maybe to test client software to see how they behave when a long running query is submitted?

Since MySQL 5.0.12, a new function was added that lets you do just that.  Aptly named sleep( seconds ) 

select sleep( 30 ); 

This will put the query to sleep and only wake up on an interupt or when the time elapses.

http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html

tags:  

links: digg this    del.icio.us    technorati    




1. Andy Wu left...
Thursday, 19 October 2006 3:08 pm :: http://andy.blog-city.com

PostgreSQL has also added this in 8.2 (currently in beta) but under the guise of the pg_sleep function.

  • SELECT pg_sleep(10);


Related Posts

Putting a MySQL query to sleep

Tuesday, 10 October 2006 8:05 A GMT
There are a number of reasons why you would want to put a MySQL query to sleep, here is how.

Resetting the root password on MySQL and managing legacy password access

Friday, 18 August 2006 3:16 P GMT
If you need to use an old client library with MySQL 5, or you need to reset the root mysql password, this entry looks at both.

Http client using digest authentication (in python)

Wednesday, 14 September 2005 8:00 A GMT
To test mod_auth_digmysql, you needed to test that it works so here are some testcases in python.

Introduction to using MySQLdb with python

Saturday, 10 September 2005 9:31 A GMT
MySQLdb is the Python DB API-2.0 interface and this blog looks at the using the MySQL from Python

How to backup and import a MySQL InnoDB database

Tuesday, 16 August 2005 10:56 A GMT
Details how to properly backup and then restore a Mysql database running Innodb as oppose to MyISAM.