Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / July 2006

Tip: Looking for answers? Try searching our database.

what is the lightest-weight client query/statement?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joe Weinstein - 28 Jul 2006 21:27 GMT
Hi all. I would like to know what the fastest, lightest weight
query/SQL a client can send to the DBMS. I want to do this
occasionally from a Java client to verify the current health
of an otherwise idle connection. In Oracle we can select from
the fake table 'DUAL', or the SQL 'BEGIN NULL; END;'. What is
a DB2 equivalent/approximate?

thanks,
Joe Weinstein at BEA Systems
shsandeep - 29 Jul 2006 04:02 GMT
db2 select 1 from SYSIBM.SYSDUMMY1
Serge Rielau - 29 Jul 2006 04:28 GMT
> Hi all. I would like to know what the fastest, lightest weight
> query/SQL a client can send to the DBMS. I want to do this
> occasionally from a Java client to verify the current health
> of an otherwise idle connection. In Oracle we can select from
> the fake table 'DUAL', or the SQL 'BEGIN NULL; END;'. What is
> a DB2 equivalent/approximate?
SELECT 1 FROM SYSIBM.SYSDUMMY1

In DB2 for LUW that won't even hit the buffer pool.
You could also update a special register (saves the cursor logic):
SET CURRENT SCHEMA = SCHEMA
Cheers
Serge
Signature

Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ondemandbusiness/conf2006/

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.