on 07-29-2015 2:24 PM
Hi,
How can I see number of partitions in a table?
Regards,
Vrushali
Hi,
You can also run a query below to see the information of a partitioned table.
/**************************************************************************************************/
select | Upper(P.partition_name) partition_name, P.partition_values, DBS.dbspace_name |
from | SYSPARTITIONS P, SYSTABLE T, SYSDBSPACE DBS |
where | P.table_id = T.table_id |
and | P.partition_dbspace_id = DBS.dbspace_id |
and t.table_name='part_order'
-- suser_name(t.creator) = 'table_owner'
order by p.partition_id
/**************************************************************************************************/
You will see this kind of results.
partition_name,partition_values, dbspace_name
'P1', '1992-12-31', 'DSP1'
'P2', '1993-12-31', 'DSP1'
'P3', '1994-12-31', 'DSP1'
'P4', '1995-12-31', 'DSP1'
'P5', '1996-12-31', 'DSP1'
'P6', '1997-12-31', 'DSP1'
'P7', '1998-12-31', 'DSP1'
'P82', MAX, 'DSP1'
'P81', '1999-12-31', 'DSP1'
Best Regards
Jerry
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sp_iqtable <tablename>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
select object_name, partitions from sp_iqdbspaceobjectinfo() where object_type='table';
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.