Re: [GENERAL] Prepared statement performance...
От | Bruce Momjian |
---|---|
Тема | Re: [GENERAL] Prepared statement performance... |
Дата | |
Msg-id | 200209271641.g8RGfFt04703@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: [GENERAL] Prepared statement performance... (Aaron Mulder <ammulder@alumni.princeton.edu>) |
Список | pgsql-jdbc |
Aaron Mulder wrote: > Dave, Barry, et al.: > > > Unless of course we were to write a > > sql parser in the jdbc driver so that we could predetermine which > > statements should use the prepare mechanism or not. > > That's a bit of an exaggeration -- all you need to check in the > JDBC driver is whether there's an unescaped ; to see if there's more than > one statement, right? It wouldn't be unreasonable to default to enabling > the feature unless there's a ; in the statement (or unless there's a ; > with anything but whitespace afterward, if you like) -- it wouldn't even > be a disaster to forget escaping and just decide based on a ; in the > statement period -- few enough statements have an escaped ; that the > suboptimal performance in that case won't matter. psql does do this by tracking quotes and parens and looking for ';'. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
В списке pgsql-jdbc по дате отправления: