virtual columns

BenA

Member
I was working on something this morning and needed to find all the tables in our EO environment that still used %RAW data type columns. I was only expecting about 10 but was surprised to find over 100. As I researched further I have found out that there are a bunch of tables in all our environments XE & EO that appear to have virtual columns within the database. This is very strange to me, as we are currently on Oracle Ent ed 10.2.0.2 and virtual columns weren't officially supported until 11g. I checked our Pristine XE & EO environment and it's the same there.

Just wondered if we are unique for some reason and if not why they have done this.

To check you can run the following query as one of the data owners..

SELECT TABLE_NAME,COUNT(*)
FROM USER_TAB_COLS
WHERE VIRTUAL_COLUMN = 'YES'
GROUP BY TABLE_NAME;
 
Ben - statistics generation/gathering in Oracle will creat virtual hidden columns that begin with SYS_. They are not visible to or used by JDE.
 
Hi Larry,

Thank you for the reply, but I'm sort of confused now. Are you saying there's a native stats gathering process in JDE that does this?

Thank you,
 
ok. I had to do a little digging but now I'm clear. I did not realize that this happened, but when there is a function-based index on a table it does indeed create the virtual columns.
The gathering of stats does not control this though. To check this, I just deleted the stats on one of the tables in question in our pristine environment and the virtual column(s) still exists.
Thank you for pointing that out. I was confused at first though because if it was the stats generation that created those virtual columns I would have expected it to be more widespread. Since all tables don't use a function-based index it is more sporadic.
Thanks,
 
Back
Top