Subject Re: [firebird-support] Re: Does object name length matter
Author Marcin Bury
In such case you might be right
but it matters when looping

PrepareSelectStatement
GetData
UnprepareSelectStatement

or
PrepareDMLStatement
SetParameters
Execute
UnprepareDMLStatement

Mark pointed another important thing in his reponse - how data fits into
TCP packet...
Another thing is how often in the whole application's process you
prepare/unprepare queries and DML statements. These also matter...

And just being curious - can someone explain how firebird client sends
data to the server in following scenario:
PrepareDMLStatement
SetParameters
ExecuteStatement
SetParameters
ExecuteStatement
UnprepareDMLStatement

Marcin


ainpoissee pisze:
> --- In firebird-support@yahoogroups.com, Marcin Bury <mbury@...> wrote:
>> And then imagine amount of data sent to server in both cases. I don't
>> know client architecture but sql statements are interpreted by a server
>> and probably client library transfers them unchanged. So optimizing the
>> amount of data received consider also amount of data sent to server.
>
> Marcin, it seems that I misunderstanded your original message... I thought about how server handles the names.
>
> However, I don't think that object name length is importand in the case you're making - the statement is sent over the wire only once and thus the hit of the object name length isn't that significant. Ie when using code like
>
> query.SQL := 'SELECT Field1, Field2, Field3 FROM TAB...';
> while(not query.eof)do data[x]:= query.Field1
>
> or
>
> query.SQL := 'UPDATE TAB SET Field1 = :Par1, Field2 = :Par2 WHERE()';
> while(not data.eof)do begin
> query.par1 := data.Value[1]
> ...
> query.Execute;
> end
>
> then the field names are sent only once and rest of the data travelling over the wire is "raw record data" without any metadata like field name/size etc... at least that's what I would expect.
> So yes, object name length matters when you only use each statement once (and they are so big that they won't fit into single packet), but in a "batch mode" where the size of statement is tiny compared to the actual data it isn't that significant...
>
> However, using 4 byte field where 1 byte would do seems significant in this context - for each 1000 records youre sending 3000 bytes of "noise" over the wire... but Dimitry seems to be sure that it wouldn't make any difference...
>
>
> ain
>
>
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups Links
>
>
>