Re: Slow statement when using JDBC
От | Maciek Sakrejda |
---|---|
Тема | Re: Slow statement when using JDBC |
Дата | |
Msg-id | AANLkTinBYdnJmxKnPuADiWhbw2AFKqkQTdrdLDUf8j1z@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Slow statement when using JDBC ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>) |
Ответы |
Re: Slow statement when using JDBC
|
Список | pgsql-jdbc |
> For queries like this, you want to be sure that the query is planned > each time based on the actual value. Which I think *is* the case until you hit prepareThreshold in JDBC, no? This has come up on the list before, and as long as you're using an unnamed server-side prepared statement, the planner will wait to plan it until it has the actual parameters available. That's why the planning savings of having the JDBC driver "upgrade" you to named statements after a few executions can come back to bite you: a parameter-agnostic plan will often be *much* costlier than re-planning every single time. However, since Yazan is seeing this right off the bat (and not after a certain number of executions), I'm suspicious. It'd be nice to see what's happening here at the protocol level. Yazan, can you configure driver-level logging through the loglevel connection param and DriverManager.setLogWriter()? --- Maciek Sakrejda | System Architect | Truviso 1065 E. Hillsdale Blvd., Suite 215 Foster City, CA 94404 www.truviso.com
В списке pgsql-jdbc по дате отправления: