Subject | RE: [IBO] IB_Query/SP/KeyLinks |
---|---|
Author | Jason Wharton |
Post date | 2004-11-01T22:05:55Z |
> What's the difference (what problems if any would be causedResults are the same.
> by) using this
> in the Query
> SELECT FIELD1 FROM SSP(:MYPARAM) WHERE FIELD3='N'
> as opposed to adding
> FIELD3='N'
> in the SQLWhereItems on Prepare SQL?
Server has to process the entire dataset sequentially to apply the where
clause logic. There is no way the server can take that where clause and
intelligently apply it to the select statement, or statements, inside the
body of the stored procedure. Therefore, the entire select procedure gets
executed for each time the query is executed.
This is very inefficient.
Jason Wharton