Subject | Re: [firebird-support] Partial update |
---|---|
Author | Dimitry Sibiryakov |
Post date | 2017-02-14T15:37Z |
14.02.2017 16:21, 'Leyne, Sean' Sean@... [firebird-support] wrote:
some (not all) fields. For example, you have a table with 10 fields. And you got following
instructions:
1) Change value of field1 to 10;
2) Change value of field2 to 20;
3) Change value of field3 to 30;
... and so on.
These instructions are coming one-by-one and must be executed immediately. What would
you do? Construct queried ad-hock, right? Simple solution, bad performance.
that are not provided in my data message.
for permissions and this stage cannot be cached.
--
WBR, SD.
> If you are using UPDATE, then is it not reasonable to expect that you would know what theIt is not reasonable: I have no way to know them. All I have at hand is new values for
> original values for of each field?
some (not all) fields. For example, you have a table with 10 fields. And you got following
instructions:
1) Change value of field1 to 10;
2) Change value of field2 to 20;
3) Change value of field3 to 30;
... and so on.
These instructions are coming one-by-one and must be executed immediately. What would
you do? Construct queried ad-hock, right? Simple solution, bad performance.
> If not, what is the "real cost" (time) of preparing statement?It is unpredictable and for update of single record used to be bigger than execute time.
> Must a statement with parameters be prepared before it can be executed via the client?Yes.
> Cus, it seems that what you are asking the engine to maintain a cache of previously executed statements.No. All I would like to ask for - to skip assignment of new values for those fields
that are not provided in my data message.
> So if you execute any un-prepared statements, the engine would compare the SQL text against the cache list and re-use the previously prepared version, instead of preparing the statement a new -- thus bypassing the "prepare" stage."Prepare" does much more than just parsing of query and building plan. It also check
>
> Is that the real issue, you want to eliminate the "prepare" stage?
for permissions and this stage cannot be cached.
--
WBR, SD.