Subject | Re: [IBO] Computed field causing slowdown |
---|---|
Author | Helen Borrie |
Post date | 2004-07-21T01:30:50Z |
At 11:28 AM 20/07/2004 -0700, you wrote:
output set. Computed columns that use subqueries are expensive, whatever
way you look at them. Using TIBOTable, you can't avoid getting ALL of the
table's columns and rows in the output. Table components don't have a place
in client/server application architecture.
Use a TIBOQuery instead and don't included the computed column in the
output of your main set. Also -- watch the size of output sets!!! Always
use a parameterised WHERE clause to limit the output to 200 rows or less.
To show the computed column for the current row only, add another query
(parameterised) containing just the primary key and the computed column,
with a 1:1 detail-master relationship to the main query.
Helen
>I added a computed field to my Firebird table, which is a select intoComputed columns get computed on select, if they are in the specified
>another table. I added the field to my TIBOTable object with the Fields
>Editor, then added a TDBText field to my form to display the value in the
>field.
>
>I noticed that now, when I scroll through the records in the table, there
>is a noticeable delay going from one record to the next, where the SQL
>hourglass appears. For me, it's about 1/4 second, but some of my customers
>are reporting a 2-3 second delay.
>
>So, I tried removing the TDBText field from the form, and also removing the
>field from the TIBOTable object, but the delay still appears. It seems
>that just having the field exist in the Firebird table causes the slowdown.
>
>So, is IBO still somehow pulling that field from Firebird, even though it's
>not in the TIBOTable?
>
>Is there any way around this? Can I get my speed back up, without
>completely eliminating the computed field from the Firebird table?
>
>I'm using IBO 4.2Gc with BCB 4, Firebird 1.0, dialect 1 database.
>
>Help!
output set. Computed columns that use subqueries are expensive, whatever
way you look at them. Using TIBOTable, you can't avoid getting ALL of the
table's columns and rows in the output. Table components don't have a place
in client/server application architecture.
Use a TIBOQuery instead and don't included the computed column in the
output of your main set. Also -- watch the size of output sets!!! Always
use a parameterised WHERE clause to limit the output to 200 rows or less.
To show the computed column for the current row only, add another query
(parameterised) containing just the primary key and the computed column,
with a 1:1 detail-master relationship to the main query.
Helen