Re: Set explain utility
Posted in 1997
Topics: General Discussion
MarkDenham@aol.com wrote:
>
> David,
>
> I would be surprised if they are generated by the prepare for the simple
> reason that
> the output contains details of the values used in filters (if my memory
> serves me
> correctly).
>
> If you prepare a query such as:
>
> SELECT * FROM orders WHERE customer_num = ? AND customer MATCHES ?>
> The query cannot be optimised until the values are known since they influence
> the
> way the query is processed.
>
> I will of course check this!
If you do not use PREPARE, your statement is parsed and optimised by
the OPEN.
If you use PREPARE, your statement is parsed by the PREPARE, and
optimised by the OPEN.
Hope that helps,
--
Mark.
+------------------------------------------------------------------+
|Mark D. Stock - The West Solutions Group http://www.west.co.za |
| The Informix FAQ is at http://www.iiug.org |
|mailto:marks@west.co.za +-----------------------------------------+
|Tel: +27 11 803 2151 |If it doesn't work, force it! |
|Fax: +27 11 803 2189 |If it breaks, it needed replacing anyway!|
|Cell: +27 83 250 2325 |Well, that's how I code anyway! |
+------------------------+-----------------------------------------+