Re: Looking at temp tables
Posted in 1997
Hey Bob,
Good to see you on here. How is life at Harrah's?
Anyway, if all you want to do is verify the # of rows and you know the name
of the temp table, you can query the sysmaster tables to get what you want.
This only works for explicitly created temp tables - tables resulting from
"select.....into temp myname" and "create temp table myname...".
Use this query:
SELECT tabname, ti_nrows
FROM systabnames, systabinfo
WHERE partnum=ti_partnum
AND tabname = "myname";
Note that if you have a fragmented temp table, you will get a row for each
fragment. Just change the ti_nrows to sum(ti_nrows) and add a group by
clause. Also note that if multiple processes create temp tables with the
same name, you will get a row for each one.
Since you are at Harrah's, check out the 'checkrows' shell script and the
tabstats programs. Both will show info for temp tables and have a usage
statement.
Take Care,
Chuck.
----
Chuck Ludwigsen <cludwigs@hotmail.com>
Sr. Engineer, Summit Data Group <chuckl@summitdata.com>
President - Memphis Informix Usr Grp <miug@hotmail.com>
** My opinions are my own and sometimes conflict with those of my employer
**
** My opinions are my own and definitely conflict with SOMEBODY **
Bob W Maccione <bmaccion@world.std.com> wrote in article
<EHA86o.2I2@world.std.com>...
> Has anyone found a way to allow one process the ability to see a temp
table
> that was/is created by another process. I know that they don't exist in
the
> sys* tables but I would think that there is some hidden hook I could get
at.
> I'm really just interested in the number of rows in the table (to tell
that the
> process is really adding data to the temp table).
>
>
> thanks,
> bob maccione
> bmaccion@world.std.com
>