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

Open Source Business Cluster Launched in New South Wales

Wednesday, 19 November 2008
IT Wire: "Headquarters in Sydney, New South Wales, an Open Source Business Cluster was announced. The aim of the cluster is to more effectively market, deliver and provide support for Open Source tech

PHP Zend Framework 1.7 adds Adobe support

Wednesday, 19 November 2008
Netstat -vat: "The open source Zend Framework 1.7 is now available expanding the PHP framework to work better with Adobe Flex and AIR applications."

Progex 8.20 ScreenShots

Wednesday, 19 November 2008
Linux Dynasty: "Here is a fairly new Linux distribution and like many new ones out there this distribution is based off of Ubuntu Linux. The installation was just an easy 7 steps just as most other Ub

Zeroshell Delivers Big Network Services in a Small Package

Wednesday, 19 November 2008
LinuxPlanet: "What gives you a firewall, load-balancing, QoS, 3G support, RADIUS, wireless access point, HTTP proxy, VPN, VLAN, PPPoE, captive portal, and a host of other useful security, authenticati

Improve Your Intelligence with Brain Workshop

Wednesday, 19 November 2008
Linux Journal: "Everywhere you turn there are "brain training" games that claim to help you "lower your brain age" or "boost your brain power" and other such marketing hyperbole. Much like saying a ce

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.