In Ingres II 10.1.0 (int.w32/105) at least, and maybe others, it looks
like local_time gets evaluated just once in a DBP. Is that intentional?
create procedure local_time_test as
declare
start_time time(9) not null;
end_time time(9) not null;
elapsed_time varchar(80) not null;
nrows integer not null;
begin
select local_time into :start_time;
select count(t.table_name||c.column_name) into :nrows
from iitables t join iicolumns c
on t.table_name = c.table_name
and t.table_owner = c.table_owner;
select local_time into :end_time;
elapsed_time = ascii(end_time-start_time);
message :elapsed_time;
end;
execute procedure local_time_test;
\p\g
OK, there's no time required for parsing/optimizing, but at
sub-millisecond resolution it should still take some mesurable time to
run the query.
--
Roy
UK Actian User Association Conference 2013 will be on Tuesday June 11. 2013.
The latest information is available from
www.uk-iua.org.uk.