IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

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: 2432
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: 1226
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

Senior Member


Joined: 14 Mar 2007
Posts: 10697
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
Use [URL] BBCode for Links
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2508
Location: NY,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

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts Need to read duplicate rows from tabl... DB2 3
No new posts Hex Table COBOL Programming 2
No new posts Catalog table SYSSTATSFEEDBACK DB2 2
No new posts Global temporary table DB2 1
No new posts Export columns from DB2 table with pi... DB2 14

Back to Top