|Subject||performance on calculated fields - performance question|
Hello! I have a customers table. I created some calculated fields in order to have the complete name of each customer in a single column. I attach the field definitions below. I don't know whether my calculated fields are "complex" or not to Firebird!
I'm testing with aprox 40.000 rows
select * from customers where company containing 'something'
Prepare time = 0ms
Execute time = 93ms
Avg fetch time = 23.25 ms
select * from customers where name_company containing 'something'
Prepare time = 15ms
Execute time = 281ms
Avg fetch time = 56.20 ms
create table customers (
name computed by (
coalesce(first_name,'') || ' ' ||
name_company computed by (
iif((company <> '')and
(name <> company)and
(name <> ''),', ','') ||