Subject | Re: [IBO] Using query plan with a dynamic statement |
---|---|
Author | Rohit Gupta |
Post date | 2012-10-04T17:46:23Z |
Its not necessary to add a plan, the firebird engine is pretty good at
selecting the best one. Many years ago I remember reading that you can
suggest a plan, but the engine might use what it wants. :-) I dont
know if its true, but it was in of the documents.
Rohit
selecting the best one. Many years ago I remember reading that you can
suggest a plan, but the engine might use what it wants. :-) I dont
know if its true, but it was in of the documents.
Rohit
On 5/10/2012 1:37 a.m., patrick_marten wrote:
>
> Hello,
>
> I'm using an IB_Cursor to obtain some data for statistics. These data
> can be viewed in different way (grouped on different fields).
> Additionally several filter criterias can be applied, depending on
> what the user would like to do.
>
> I'm checking all this and build my SQL statement. In order to increase
> performance, I'm using query plan, but sometimes it's causing
> problems, it seems.
>
> Depending on the final statement, query plan can differ - at least
> that's what I see in IBXpert or other tools. I'd copied it and added
> it to the cursor at the end. Mostly it seemed to work with this single
> plan string for all cases, but recently I'm getting some errors sometimes:
> "unsuccessful metadata update
> request depth exceeded. (Recursive definition?)"
>
> Once I remove the plan string, everything works fine.
>
> Is it neccessary at all, to add a plan string? That's what I thought
> because of the performance.
>
> If that's correct: is there a way to determine a correct plan string
> for each SQL statement (automatically)? There are just too many
> constellations how the SQL statement could be, depending on the
> criterias defined by the user...
>
> Best regards,
> Patrick
>
>
>
>
> __________ Information from ESET Endpoint Antivirus, version of virus
> signature database 7546 (20121004) __________
>
> The message was checked by ESET Endpoint Antivirus.
>
> http://www.eset.com
--
Regards
*Rohit Gupta*
B.E. Elec., M.E., Mem IEEE, Member IET
Technical Director
Computer Fanatics Ltd
*Tel *4892280
*Fax *4892290
*Web *www.cfl.co.nz
------------------------------------------------------------------------
This email and any attachments contain information, which is
confidential and may be subject to legal privilege and copyright. If you
are not the intended recipient, you must not use, distribute or copy
this email or attachments. If you have received this in error, please
notify us immediately by return email and then delete this email and any
attachments.
[Non-text portions of this message have been removed]