14.02.2017 16:21, 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support] wrote: > If you are using UPDATE, then is it not reasonable to expect that you would > know what the > original values for of each field?
It is not reasonable: I have no way to know them. All I have at hand is new values for 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. > > Is that the real issue, you want to eliminate the "prepare" stage? "Prepare" does much more than just parsing of query and building plan. It also check for permissions and this stage cannot be cached. -- WBR, SD. ------------------------------------ ------------------------------------ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Visit http://www.firebirdsql.org and click the Documentation item on the main (top) menu. Try FAQ and other links from the left-side menu there. Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ------------------------------------ Yahoo Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-support/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-support/join (Yahoo! ID required) <*> To change settings via email: firebird-support-dig...@yahoogroups.com firebird-support-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: firebird-support-unsubscr...@yahoogroups.com <*> Your use of Yahoo Groups is subject to: https://info.yahoo.com/legal/us/yahoo/utos/terms/