Subject | Re: [firebird-support] for select c from t where :p = initial-value-of-p into p .... weird behavior |
---|---|
Author | Anderson Farias |
Post date | 2008-11-04T19:56:55Z |
Hi,
These are 2 different cases, than with diferent behaviors.
Regards,
Anderson Farias
[Non-text portions of this message have been removed]
> SQL1: for select c, c from t where :p = 1234 into p, r do suspend;IMHO, the difference seems clear. On the first SELECT is the *param* that is evaluated so for each row in the table the engine cheks it again, while on the 2nd select is the table *field* that is evalueted so it seems logical (not to mention performance reasons) that all rows are selected at once based on the [field] criteria.
> SQL2: for select c from t where c in (1, 2, :p) into r do
These are 2 different cases, than with diferent behaviors.
Regards,
Anderson Farias
[Non-text portions of this message have been removed]