RE: dbspace of where table is stored
Posted in 2000
Topics: Storage & Space Management
If you dont want to use dbschema -ss utility , get the table partnum (from
systables) in hexadecimal format ( 0xDDDLLLLL). The first 3 digits give you
the dbspace number. You can check this dbsnum in the sysmaster:sysdbspaces
for the dbspace_name.
If your table is fragmented, it is better you get the partnum from
sysmaster:systabnames instead of your_db:systables.
There may be a direct way to do this. Anyone?
> -----Mensaje original-----
> De: Jiri Lisicky [SMTP:lisicky@datis.cdrail.cz]
> Enviado el: Lunes 13 de Noviembre de 2000 11:00 AM
> Para: informix-list@iiug.org
> Asunto: dbspace of where table is stored
>
> Please, where I find "systable" where is this info stored?
>
> Thanks
> --
> Ji'' Lisick' 'D KM'P Olomouc
> e-mail: lisicky@datis.cdrail.cz V'de'sk' 15
> phone: +420-068-472-2272 Olomouc, Czech Republic
> >>> 'e'tina ISO-8859-2 Compatible <<<
Here's a SQL statement that should return the dbspace of where a table is located, provided the table isn't fragmented. select name Dbspace, dbsname Database, tabname Table from sysmaster:sysdbspaces a, sysmaster:systabnames b where a.dbsnum = trunc(hex(b.partnum)/1048576) and tabname='table_name'; Of course substitute table_name for the actual table name. -- Phillip Tien Database Administrator Whole Foods Market, Inc. If I ever get rich, I hope I'm not real mean to poor people, like I am now.
Why not use the stored procedures already in sysmaster? select name Dbspace, dbsname Database, tabname Table from sysmaster:sysdbspaces a, sysmaster:systabnames b where a.dbsnum = partdbsnum(b.partnum) and tabname='table_name'; partdbsnum(partnum) returns the dbspace number! More portable to future releases?? Phillip wrote in message <3A106165.9F5A9567@wholefoods.com>... >Here's a SQL statement that should return the dbspace of where a table is >located, provided the table isn't fragmented. > >select name Dbspace, dbsname Database, >tabname Table >from sysmaster:sysdbspaces a, sysmaster:systabnames b >where a.dbsnum = trunc(hex(b.partnum)/1048576) >and tabname='table_name'; > >Of course substitute table_name for the actual table name. > > >-- >Phillip Tien >Database Administrator >Whole Foods Market, Inc. > >If I ever get rich, I hope I'm not real mean to poor people, like I am now. > >
Related threads
- Conversion to differeent characters sets
- Problem in changing locale via dbexport/dbimport
- RE: openlink error "Unable to load locale categories"