休眠属性
谁能解释一下这两个属性
Q1。 hibernate.cglib.use_reflection_optimizer ?设置为true和false的效果是什么
Q2. hibernate.c3p0.max_statements 。我阅读了 hibernate 文档 https://www.hibernate.org/214.html。它只提到默认值是0。我使用的是oracle10g,我设置为100。但我想知道如何找出最大数据库可以支持多少?这个属性是否意味着sql语句可以支持的最大长度?
can anyone explain on this 2 properties
Q1. hibernate.cglib.use_reflection_optimizer ? what is the effect of setting to true and false
Q2. hibernate.c3p0.max_statements . i read hibernate doc https://www.hibernate.org/214.html. it only mentioned default value is 0. I am using oracle10g, and i set to 100. but i want to know how to find out what is the max database can support? also dose this property mean max length of sql statement can support?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
A1.
false
将使 Hibernate 启动更快,因为它不会尝试构建 cglib 增强对象来访问 getter/setter,并使用标准 JDK 反射进行访问。不过,它可能会对整体运行时性能产生一些负面影响。而值true
的含义恰恰相反。参考:https://www.hibernate.org/194.html
A2 .是c3p0的PreparedStatement缓存的大小。零表示语句缓存已关闭。
从您的评论看来,您仍然不清楚
PreparedStatement
的 c3p0 的大小。我认为你应该阅读PreparedStatement
,然后你就能理解了。从文档,
因此,这意味着它会缓存
PreparedStatement
对象。在这种情况下,底层数据库并不重要。A1.
false
will make Hibernate start faster since it does not try to build cglib-enhanced objects to access getter/setters, and use standard JDK reflection for access. It might have some negative impact on overall runtime performance, though. And the valuetrue
means just the opposite.Refer to: https://www.hibernate.org/194.html
A2. It is the size of c3p0's PreparedStatement cache. Zero means statement caching is turned off.
As it seems from your comments, you are still not clear about the size of c3p0 for
PreparedStatement
. I think you should read onPreparedStatement
, then you will be able to understand.From the docs,
So, that means it caches the
PreparedStatement
objects. Underlying database doesn't matter in this case.