Good evening,

 

I've been looking for a way to utilize some code I learned at the
Advanced Training course, but it is very slow in my database.  What I
would like to do is display the column name and column description from
sys_columns in a choose statement.  The code below takes over 1 minute:

 

CHOOSE vfMrgCol_Col FROM #VALUES FOR +

  ((LJS(SYS_column_NAME,22))&SYS_COMMENT), +

  SYS_column_NAME +

  FROM SYS_columns +

  WHERE SYS_TABLE_ID = 339

 

This code takes only 1 second but doesn't display the column
description:

 

CHOOSE vfMrgCol_Col FROM #COLUMNS +

  IN coreinfo

 

Poking around I discovered:

*        There are approximately 5400 rows in sys_columns

*        Depending on how I look at the sys_columns table such as in dos
6.1a or Rbase 7.6 for Windows I get a different number of rows

*        If I project sys_columns to a temporary table in Rbase7.6 it
takes the same couple of minutes as the choose and I get over 26,800
rows.  It appears that the temporary table somehow includes columns from
views, but I'm not sure the sys_columns table actually has the columns?


*        The temporary table displays the column names with their
description very quickly, but I don't want to maintain a separate table.

 

Thanks for any insight anyone can provide.

 

Duey

Reply via email to