Subject about computed fields performance
Author Anderson Farias
Hi all,

I have a doubt about computed fields. Let´s say a have this table:


create table vendor (
code integer not null,
name varchar(30) not null,
phone varchar(20),

last_contract computed by (
(select max(cdate) from contracts where vendor=vendor.code)),

total_amount computed by (
(select sum(totalvalue) from contracts where
vendor=vendor.code)),

constraint pk_vendor primary key (code)
);


now, what I want to know is if by doing a select on this table, only
against non computed fields (eg. select name, phone from vendor)
will couse Fb to calculate fields last_contract and total_amount ?!?

putting it another way, do I have 'performance hits' when querying
only non computed fields on tables that do have computed fields
(like those I mentioned above) ?!

Thanks for any comment,

Regards,
Anderson Farias