From: apple on 18 Jun 2010 10:04 I'm on v9.1, Range partition table is what I'm talking about. Looking for "card" by partition hidden in the catalogs somewhere and is updated with stats because I want a query to pull "card" for all tables in a database and the tables that are partitioned, I want "card" by partition. This doesn't work ... select seqno, card from syscat.datapartitions where tabname = 'your_table' .... there is no "card" column in syscat.datapartitions. I wished there was. It would solve my problem. This won't work for me either ... select datapartitionnum(col1), count(*) from your_table group by datapartitionnum(col1) .... because it's on an individual table. And querying each and every table would take way too long, especially numerous partitioned ones with numerous partitions containing hundreds of millions of rows. Am I out of luck?
From: The Boss on 18 Jun 2010 10:22 On Jun 18, 4:04 pm, apple <jbapplewh...(a)aep.com> wrote: > I'm on v9.1, Range partition table is what I'm talking about. Looking > for "card" by partition hidden in the catalogs somewhere and is > updated with stats because I want a query to pull "card" for all > tables in a database and the tables that are partitioned, I want > "card" by partition. > > This doesn't work ... > > select seqno, card from syscat.datapartitions > where tabname = 'your_table' > > ... there is no "card" column in syscat.datapartitions. I wished there > was. It would solve my problem. > > This won't work for me either ... > > select datapartitionnum(col1), count(*) > from your_table group by datapartitionnum(col1) > > ... because it's on an individual table. And querying each and every > table would take way too long, especially numerous partitioned ones > with numerous partitions containing hundreds of millions of rows. > > Am I out of luck? I'm afraid so, unless you can upgrade to v9.7, where the "card" column was added to syscat.datapartitions (together with a lot of other new columns). -- Jeroen
First
|
Prev
|
Pages: 1 2 Prev: avgrowcompressionration in syscat.tables not updated Next: Sybase to DB2 = ANTS Software |