View previous topic :: View next topic
|
Author |
Message |
rizwanaccy
New User
Joined: 02 Jan 2018 Posts: 11 Location: INDIA
|
|
|
|
Hi,
There is table which has below fields.
#A char(6)
#B char(11)
#C char (4)
#D timestamp
#E SMALLINT
#F CHAR(2)
#G AIKA_TALLETUS
#H VARCHAR(1000)
Normal select query takes much time than usual. Cobol module using cursor on this table always get abended with deadlock.
Can any body help me to diagnose this table? I mean how to check this table has proper indexes etc ?
P.S. - I only have datastudio to use DB2. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
You take all the information about your query to your friendly DB2 DBA and they will sort it all out for you. That is part of their job. |
|
Back to top |
|
|
rizwanaccy
New User
Joined: 02 Jan 2018 Posts: 11 Location: INDIA
|
|
|
|
That's the thing I don't have a friendly DBA. How can I start investigating myself through data studio? |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
rizwanaccy wrote: |
That's the thing I don't have a friendly DBA. How can I start investigating myself through data studio? |
You cannot "diagnose" a table. And to see if there are indices defined on it, you use the catalog, which you can also query using SQL!
By the way, this is a forum for mainframe experts, data studio seems to be something that runs on small white boxes. |
|
Back to top |
|
|
rizwanaccy
New User
Joined: 02 Jan 2018 Posts: 11 Location: INDIA
|
|
|
|
Would you please post sample query to find indices in a table ? that I can run on QMF/SPUFI? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
|
|
First, Why you need indexes when you just have a select query (I assume it’s without a where clause , since you didn’t put efforts to show us sql ) ?
Second , did you use WITH UR when you declared the cursor ? If not then use it and rerun.
Third, you must the know what you are why you just doing select without having any predicates in where , because having just a select query on a large table doesn’t makes sense instead unload the table into PS data set and process it. |
|
Back to top |
|
|
|