Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
DB2 table quality

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
rizwanaccy

New User


Joined: 02 Jan 2018
Posts: 11
Location: INDIA

PostPosted: Mon Apr 01, 2019 1:28 pm    Post subject: DB2 table quality
Reply with quote

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
View user's profile Send private message

Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2162
Location: UK

PostPosted: Mon Apr 01, 2019 5:12 pm    Post subject: Reply to: DB2 table quality
Reply with quote

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
View user's profile Send private message
rizwanaccy

New User


Joined: 02 Jan 2018
Posts: 11
Location: INDIA

PostPosted: Mon Apr 01, 2019 5:53 pm    Post subject: Reply to: DB2 table quality
Reply with quote

That's the thing I don't have a friendly DBA. How can I start investigating myself through data studio?
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1148
Location: Vilnius, Lithuania

PostPosted: Mon Apr 01, 2019 11:39 pm    Post subject: Re: Reply to: DB2 table quality
Reply with quote

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
View user's profile Send private message
rizwanaccy

New User


Joined: 02 Jan 2018
Posts: 11
Location: INDIA

PostPosted: Tue Apr 02, 2019 12:18 pm    Post subject: Reply to: DB2 table quality
Reply with quote

Would you please post sample query to find indices in a table ? that I can run on QMF/SPUFI?
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10586
Location: italy

PostPosted: Tue Apr 02, 2019 2:23 pm    Post subject:
Reply with quote

Quote:
Normal select query takes much time than usual.


define usual, and how You determined that the query take longer than that

Quote:
Cobol module using cursor on this table always get abended with deadlock.


deadlocks do not depend on the table structure
only on the implementation of the application logic

- unless you played around with
https://www.ibm.com/support/knowledgecenter/en/SSEPEK_11.0.0/perf/src/tpc/db2z_uselocksizeclause.html
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 2129
Location: NY,USA

PostPosted: Wed Apr 03, 2019 5:59 am    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts COBOL Table Question GAPX1 COBOL Programming 3 Thu Mar 07, 2019 9:48 pm
No new posts General Query on DB2 table design subratarec DB2 3 Thu Feb 14, 2019 12:49 pm
No new posts What is a table space in db2 for z/os? martin schlatter DB2 13 Sat Nov 24, 2018 11:19 pm
No new posts Modify the value of a extensionvariab... UmeySan CLIST & REXX 29 Wed Nov 14, 2018 11:48 pm
No new posts Facing Issue in Table Reorg satish.ms10 DB2 1 Tue Aug 07, 2018 2:44 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us