We're using myBatis for database access and would like to use play
evolutions for database migration.
When the db properties are configured in application.conf, so that
evolutions can be used, we encounter significant performance impacts
during normal requests. If the database is not configured everything is ok.
On a simple page request the average response time goes up from 2ms to 27ms.
Some part of play seems to access the database every request with
queries like this:
"SELECT NULL AS TABLE_CAT, n.nspname AS TABLE_SCHEM, c.relname AS
TABLE_NAME, CASE n.nspname ~ '^pg_' OR n.nspname =
'information_schema' WHEN true THEN CASE WHEN n.nspname = 'pg_catalog'
OR n.nspname = 'information_schema' THEN CASE c.relkind WHEN 'r' THEN
'SYSTEM TABLE' WHEN 'v' THEN 'SYSTEM VIEW' WHEN 'i' THEN 'SYSTEM
INDEX' ELSE NULL END WHEN n.nspname = 'pg_toast' THEN CASE
c.relkind WHEN 'r' THEN 'SYSTEM TOAST TABLE' WHEN 'i' THEN 'SYSTEM
TOAST INDEX' ELSE NULL END ELSE CASE c.relkind WHEN 'r' THEN
'TEMPORARY TABLE' WHEN 'i' THEN 'TEMPORARY INDEX' WHEN 'S' THEN
'TEMPORARY SEQUENCE' WHEN 'v' THEN 'TEMPORARY VIEW' ELSE NULL END
END WHEN false THEN CASE c.relkind WHEN 'r' THEN 'TABLE' WHEN 'i'
THEN 'INDEX' WHEN 'S' THEN 'SEQUENCE' WHEN 'v' THEN 'VIEW' WHEN 'c'
THEN 'TYPE' ELSE NULL END ELSE NULL END AS TABLE_TYPE,
d.description AS REMARKS FROM pg_catalog.pg_namespace n,
pg_catalog.pg_class c LEFT JOIN pg_catalog.pg_description d ON (c.oid =
d.objoid AND d.ob"
What could cause these complex, useless queries?
Evolutions? The JPA plugin (there are no JPA entities in the
application)? The DB plugin itslef?
Any help is appreciated!
--
Florian
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
-- Florian Gutmann
Yes you are right, it should be disabled for each request in prod mode.
--
Guillaume Bort, http://guillaume.bort.fr
http://play.lighthouseapp.com/projects/57987-play-framework/tickets/913
The pull request applies on master and contains also the fix for #910,
which is already merged into 1.2.x (but not master).
I hope this is ok.
Thanks,
Florian
--
Florian Gutmann