Stefan
Well-Known Member
Windows 7 x64 with 10.2B04 32-bit (also verified with 9.1E04 on Windows 2003 32-bit).
I have seen a few posts on ProgressTalk with references to unexpected behavior of XREF in combination with temp-tables. Today I wanted to see the index selection being used and to my surprise nothing that is happening with the temp-table is being logged by XREF.
This is then xref'ed with:
The xref output then contains no reference whatsoever to the temp-table:
Is this expected? This example is of course a no-brainer, but I really would like some more information on indexes being used in large temp-tables without guessing the index being used.
As a work-around I can create a dynamic query and grab the INDEX-INFORMATION, but I was rather surprised in the lack of XREF information on static temp-table usage.
I have seen a few posts on ProgressTalk with references to unexpected behavior of XREF in combination with temp-tables. Today I wanted to see the index selection being used and to my surprise nothing that is happening with the temp-table is being logged by XREF.
Code:
DEFINE TEMP-TABLE tt
FIELD cc AS CHAR
FIELD dd AS INT
INDEX tt1ix IS UNIQUE PRIMARY cc
INDEX tt2ix dd.
FOR EACH tt WHERE tt.dd = 0:
MESSAGE tt.cc.
END.
This is then xref'ed with:
Code:
COMPILE c:/temp/tt.p XREF c:/temp/tt.txt.
The xref output then contains no reference whatsoever to the temp-table:
Code:
c:\temp\tt.p c:\temp\tt.p 1 COMPILE c:/temp/tt.p
c:\temp\tt.p c:\temp\tt.p 1 CPINTERNAL ISO8859-1
c:\temp\tt.p c:\temp\tt.p 1 CPSTREAM ISO8859-1
c:\temp\tt.p c:\temp\tt.p 1 STRING "tt" 2 NONE UNTRANSLATABLE
c:\temp\tt.p c:\temp\tt.p 1 STRING "cc" 2 NONE UNTRANSLATABLE
c:\temp\tt.p c:\temp\tt.p 1 STRING "dd" 2 NONE UNTRANSLATABLE
c:\temp\tt.p c:\temp\tt.p 9 STRING "tt1ix" 5 NONE UNTRANSLATABLE
c:\temp\tt.p c:\temp\tt.p 9 STRING "tt2ix" 5 NONE UNTRANSLATABLE
Is this expected? This example is of course a no-brainer, but I really would like some more information on indexes being used in large temp-tables without guessing the index being used.
As a work-around I can create a dynamic query and grab the INDEX-INFORMATION, but I was rather surprised in the lack of XREF information on static temp-table usage.