Search code examples
sqlteradatatemp-tablessql-tuningglobal-temp-tables

teradata - volatile table


2 Questions

  • I populated a volatile table with couple of million rows and am running a query via bteq on a Solaris Client ( so it runs regardless of my workstation connection) . Now If I see the run time explain stuck at some step , I want to abort just the query without loosing my session and VT contents how can this be done without admin privs.

    • Where are Stats stored for a VT and How can I indirectly access them or get a hint

Solution

  • @user1874594 : you didn't specified which mode you are interactive or batch if you query is running for a long time in interactive mode , you can do below press control+C BREAK received. Input Command: [after pressing break key or control C]

    and then fire ABORT . You will get below screen.

    abort;
     *** ABORT signal received.
     *** Warning: Canceling the rest of the output.
     BTEQ -- Enter your SQL request or BTEQ command:
    

    your VT table is still there..:)

    2) VT tables are stored in SPOOL and there stats are collected in memory. You can't access them directly. Help stats is the only way .

    By the way if you have script experience then write a shell script and get that stats in a file.