IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DB2 table quality


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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: 2455
Location: Hampshire, UK

PostPosted: Mon Apr 01, 2019 5:12 pm
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
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: 1306
Location: Vilnius, Lithuania

PostPosted: Mon Apr 01, 2019 11:39 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Apr 02, 2019 2:23 pm
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
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

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Wed Apr 03, 2019 5:59 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top