[Tarantool-patches] [PATCH v2 11/16] sql: introduce sql_stmt_sizeof() function

Nikita Pettik korablev at tarantool.org
Fri Dec 13 16:56:38 MSK 2019


On 04 Dec 14:59, Konstantin Osipov wrote:
> * Nikita Pettik <korablev at tarantool.org> [19/11/21 10:00]:
> > To implement memory quota of prepared statement cache, we have to
> > estimate size of prepared statement. This function attempts at that.
> 
> I suggest sql_stmt_est_size() as the name.

OK, renamed.
 
> I would add size-caching right away, to make this function cheap.
> 
> if (size != 0)
>     return size;

Does it make any sense? Now for one VM instance it can be called at
most three times: twice during insertion and once during deletion.

> I wonder if we could use another region for the bytecode to 
> make this quick & cheap to maintain...
> 
> I don't want to sidetrack this work, though.
> 
> So lgtm.
> 
> 
> -- 
> Konstantin Osipov, Moscow, Russia


More information about the Tarantool-patches mailing list