472,995 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,995 software developers and data experts.

Tables without indexes

Hello!

Is there a way to find out, using an SQL statement, which tables in a
DB2 database have no indexes created on them?

My environment is DB2 UDB V7.2 Fixpak 6 on AIX 4.3.3

Thank you
Nov 12 '05 #1
2 2808
"Demetris" <DM***@laiki.com> wrote in message
news:c5**************************@posting.google.c om...
Hello!

Is there a way to find out, using an SQL statement, which tables in a
DB2 database have no indexes created on them?

My environment is DB2 UDB V7.2 Fixpak 6 on AIX 4.3.3

Thank you


You can query the DB2 catalog views. Check out the SQL Reference in the
appendix for a description of the Catalog Views. The two tables (really
views) that you want to access are syscat.tables and syscat.indexes. I will
not spoil the fun you will have in writing the SQL statement yourself. The
required SQL should be fairly easy to figure out if you look at the Catalog
Views.
Nov 12 '05 #2
Demetris wrote:

Hello!

Is there a way to find out, using an SQL statement, which tables in a
DB2 database have no indexes created on them?

My environment is DB2 UDB V7.2 Fixpak 6 on AIX 4.3.3

Thank you


select tabname from syscat.tables t where type = 'T' and tabschema =
'<your_schema>' and not exists (select tabname from syscat.indexes i
where i.tabname = t.tabname)

--
Dieter Wagner Di***********@tde-online.de
Software Development Group I TDE - Tele Data Electronic GmbH
Durmersheim, Germany
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dominic Marks | last post by:
Hi, (I apologise if this is the wrong list, I haven't posted to a postgresql.org mailing list before, general seemed like a good catch-all) I am trying to implement a centralised...
2
by: Molly | last post by:
Does anyone know of any good tools for fast, on-line reorgs of a very large DB2 UDB table? We need to reorg a couple of our large (+1 billion rows) tables. We migrated from V7.2 to V8.1, but we...
7
by: Joe | last post by:
I am using Access 2003 and are linking to an Oracle 9i ODBC datasource (using Oracle ODBC drivers). After linking the tables in Access, I inspect the data contained in the linked tables. For...
3
by: MaRCeLO PeReiRA | last post by:
Hi guys, Is there a way I can separate things in PostgreSQL? Putting tables in a disk partition and indexes in another one????? Regards, MaRcELo PeReiRa PHP/SQL/PostgreSQL
10
by: Jim Devenish | last post by:
I have a split front end/back end system. However I create a number of local tables to carry out certain operations. There is a tendency for the front end to bloat so I have set 'compact on...
3
by: ramraj | last post by:
Hello people, I might sound a little bit crazy, but is there any possibility that you can incorporate 4^15 (1,073,741,824) tables into a SQL Database? I mean, is it possible at all? There might...
0
by: asorkoram | last post by:
Hello, I have a 3rd party app that uses SQL server to store its data. I am also creating a MS Access 2003 app to access the data. When I import the tables a few of the tables have over the 32 index...
0
by: asorkoram | last post by:
Hello, I have a 3rd party app that uses SQL server to store its data. I am also creating a MS Access 2003 app to access the data. When I import the tables a few of the tables have over the 32 index...
16
by: Okonita via DBMonster.com | last post by:
Hi all, I am comming along with all this Linus/DB2/scripting business...I am no longer scared of it!! (LOL). But, I need to create a .ksh script that does a REORGCHK and output only tables...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.