A lot of stored templates (cursors)


#1

Hi guys,

I’ve found here https://en.wikipedia.org/wiki/MemSQL

“Queries are then stripped of their parameters and the query template is stored as a shared object which is subsequently matched against incoming queries to the system”

Might it be, after some time you will get a lot of these ‘templates’ (cursors)? And it waste the all of memory?

Regards,
Maxim Skidan


#2

The plan_expiration_minutes system var controls how long a compiled query plan stays cached in memory (If the plan isn’t reused in plan_expiration_minutes it will be removed from memory). See https://docs.memsql.com/concepts/v6.7/code-generation/ for more details.