home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / datatl25.zip / DCTDSGN.Z / EWSQDMIG.QRY < prev    next >
Text File  |  1997-09-11  |  2KB  |  65 lines

  1. #NAME#
  2. DA_DB2390IndexGlossary
  3. #DESCRIPTION#
  4. The index glossary query returns the characteristics of the index and indexspace which are referenced by the specified index name.   In addition to specifying the table indexed and the columns used, it returns the such information as the freepage and percent free parameters, what storage group, bufferpool, and/or ICF catalog the indexspace uses and information about any indexspace partitions.   
  5.  
  6. View type:  DAQDB2390Index
  7.  
  8. Modifications:
  9. Change the search criteria of the index name using the = (equals), IN or LIKE elements in the SQL WHERE clause.  The WHERE clause may be changed to locate all indices or indexspaces which match  the specified characteristics. In order to provide unique DB2/390 index names, the name has the format <>RelSystem:CreatorID:::IndexName<variation:revision>.
  10.  
  11. To find all DB2/390 indexes which have a specific simple name, use the LIKE clause with % as either or both of the first two qualifiers.  To speed up your query, use % to include the colons and separators.  For example, if you want all indexes starting "CUST", specify LIKE '%::CUST%'.
  12.                                       
  13.  
  14. #MODIFIED#
  15.  
  16. #VERSION#
  17.  
  18. #SQL STATEMENT#
  19. SELECT DISTINCT
  20.   i.db2390Index,
  21.   i.creatorID,
  22.   i.inRelationalSystem..relationalSystem,
  23.   i.inPhysicalDesign..db2390PhysicalDesign,
  24.   t.db2390Table,
  25.   i.partitionsTablespace..db2390Tablespace as partitionsTablespace,
  26.   k.keyDefinition,
  27.   k.keyColumnName,
  28.   k.ascDescFlag,
  29.   i.indexType,
  30.   i.uniqueFlag,
  31.   i.clusterFlag,
  32.   s.closeRule,
  33.   s.deferRule,
  34.   s.subPages,
  35. -- the following apply to the index as a whole rather than any partition
  36.   s.usesBufferpool..db2390Bufferpool,
  37.   s.idxStorageGroup..db2390Storagegroup as indexStogroup,
  38.   s.idxPrimaryQty,
  39.   s.idxSecondaryQty,
  40.   s.idxICFCatalog..ICFCatalog as idxICFCatalog,
  41.   s.idxFreePage,
  42.   s.idxPercentFree,
  43.   s.numPartitions,
  44. -- the following apply to an index partition
  45.   s.idxPartNumber,
  46.   s.idxPartStogroup..db2390Storagegroup as partitionStogroup,
  47.   s.idxPartPrimaryQty,
  48.   s.idxPartSecondaryQty,
  49.   s.idxPartICFCatalog..ICFCatalog as idxPartICFCatalog,
  50.   s.idxPartFreePages,
  51.   s.idxPartPctFree,
  52.   p.lastUpdate
  53. FROM OUTER
  54.   DAQDB2390Index i,
  55.   (i.forTable) t,
  56.   (i.usesKeyDefinition) k,
  57.   (i.inIndexspace) s,
  58.   PartView p
  59. WHERE
  60.   i.db2390Index LIKE '<>%' AND
  61.   i.db2390Index=p.baseName AND
  62.   p.partType='DSRMRDIndex'
  63. ORDER BY
  64.   i.db2390Index
  65.