How to look at prepared statements?

Hi, we recently hit the max_prepared_stmt_count limit in our environment. We believe we have a work around but while looking at the issue I felt a bit like I was working blind. In particular I was trying to find a way to see how many prepared statements we currently have on the server and, ideally, a mechanism to see what queries/requests are actually in the set of prepared statements.
Is there a mechanism to get those 2 pieces of information?
Thanks,
Joe Levin
Curriculum Associates

Hi Joe. Sorry to hear you had trouble with that. SingleStore supports prepared statements really for MySQL functional compatibility, not performance reasons. See some discussion on that here.

Our plan cache and compilation provides the benefits other systems sometimes require prepared statements to get. You can browse the plan cache (effectively all the compiled statements, which are implicitly “prepared” statements) by querying information_schema.mv_plancache, information_schema.plancache, and using SHOW PLANCACHE.

You can use

set global max_prepared_stmt_count = <value>;

to increase the limit if you need to.