If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > select statement taking ages

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-29-09, 01:06
theroadrunnershow theroadrunnershow is offline
Registered User
 
Join Date: Jul 2009
Posts: 1
select statement taking ages

hi
im running this simple select query from data studio

select * from ORDERSLIST with ur

(i was actually testing a stored procedure which is taking 90-100 seconds now, where as it was just taking 4-5 seconds a few days back)
i found out that this select query now is taking 40-50 seconds in my DB..

cound some 1 help on this?
Reply With Quote
  #2 (permalink)  
Old 07-29-09, 01:56
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
How many rows in the table?
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 07-29-09, 09:34
Cougar8000 Cougar8000 is offline
Registered User
 
Join Date: Nov 2005
Location: IL
Posts: 554
Did you introduce any changes to your environment or db?
__________________
--
IBM Certified DBA on DB2 for Linux, UNIX, and Windows

DB2 v9.1.0.2 os 5.3.0.0
Reply With Quote
  #4 (permalink)  
Old 07-29-09, 12:28
Lenny77 Lenny77 is offline
Registered User
 
Join Date: Jul 2009
Location: NY
Posts: 886
Try to change your query from

Quote:
select * from ORDERSLIST with ur
to

Quote:
select * from ORDERSLIST
optimize for N rows
fetch first N rows only
with ur
Lenny K.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On