g***l 发帖数: 352 | 1 有了spring/hibernate,还有人直接用JDBC写database application code吗? |
s******e 发帖数: 493 | 2 of course if you really care about your app performance.
ORM tools are never good for batch updates/insertions/deletions. They are
not designed to provide you performance. They are designed to simplify your
current and future development process. |
g*****g 发帖数: 34805 | 3 That's not exactly true. ORM allows a simple way to do caching,
that can reduce DB hits in many cases. Of course an ORM generated
SQL batch cannot beat carefully hand-written ones, but there's a
reason stored procesure is not popular these days.
your
【在 s******e 的大作中提到】 : of course if you really care about your app performance. : ORM tools are never good for batch updates/insertions/deletions. They are : not designed to provide you performance. They are designed to simplify your : current and future development process.
|
s******e 发帖数: 493 | 4 Well if that is the case you can write your own query object pattern with
cache to do it.
Did I mention SP? I did not get it. |
g*****g 发帖数: 34805 | 5 Then you end up with your own ORM. I've seen that in two companies
I've worked with. Neither of them is very well written.
【在 s******e 的大作中提到】 : Well if that is the case you can write your own query object pattern with : cache to do it. : Did I mention SP? I did not get it.
|
g***l 发帖数: 352 | 6 How about Java Persistence API?
【在 g*****g 的大作中提到】 : Then you end up with your own ORM. I've seen that in two companies : I've worked with. Neither of them is very well written.
|
r*****l 发帖数: 2859 | 7 JPA is a standard and Hibernate supports it. In other words, Hibernate is
one of JPA implementations.
【在 g***l 的大作中提到】 : How about Java Persistence API?
|
r*****l 发帖数: 2859 | 8 This always comes down to flexibility vs standard/convention. A real good
developer can take advantage of straight JDBC's flexibility and write good
code that outperforms Hibernate. However, real good developers are rare and
for most of us, using Hibernate will yield better results.
【在 g*****g 的大作中提到】 : That's not exactly true. ORM allows a simple way to do caching, : that can reduce DB hits in many cases. Of course an ORM generated : SQL batch cannot beat carefully hand-written ones, but there's a : reason stored procesure is not popular these days. : : your
|
T*********g 发帖数: 496 | 9 don't think so. Take Hibernate for example, stateless session is
specifically designed for batch processing, which will by pass the session
level cache and second level cache.
your
【在 s******e 的大作中提到】 : of course if you really care about your app performance. : ORM tools are never good for batch updates/insertions/deletions. They are : not designed to provide you performance. They are designed to simplify your : current and future development process.
|
m******e 发帖数: 1293 | 10 Jdbc's batch update /insert /delete is way faster than hibernate
【在 T*********g 的大作中提到】 : don't think so. Take Hibernate for example, stateless session is : specifically designed for batch processing, which will by pass the session : level cache and second level cache. : : your
|
|
|
g***l 发帖数: 352 | 11 有了spring/hibernate,还有人直接用JDBC写database application code吗? |
s******e 发帖数: 493 | 12 of course if you really care about your app performance.
ORM tools are never good for batch updates/insertions/deletions. They are
not designed to provide you performance. They are designed to simplify your
current and future development process. |
g*****g 发帖数: 34805 | 13 That's not exactly true. ORM allows a simple way to do caching,
that can reduce DB hits in many cases. Of course an ORM generated
SQL batch cannot beat carefully hand-written ones, but there's a
reason stored procesure is not popular these days.
your
【在 s******e 的大作中提到】 : of course if you really care about your app performance. : ORM tools are never good for batch updates/insertions/deletions. They are : not designed to provide you performance. They are designed to simplify your : current and future development process.
|
s******e 发帖数: 493 | 14 Well if that is the case you can write your own query object pattern with
cache to do it.
Did I mention SP? I did not get it. |
g*****g 发帖数: 34805 | 15 Then you end up with your own ORM. I've seen that in two companies
I've worked with. Neither of them is very well written.
【在 s******e 的大作中提到】 : Well if that is the case you can write your own query object pattern with : cache to do it. : Did I mention SP? I did not get it.
|
g***l 发帖数: 352 | 16 How about Java Persistence API?
【在 g*****g 的大作中提到】 : Then you end up with your own ORM. I've seen that in two companies : I've worked with. Neither of them is very well written.
|
r*****l 发帖数: 2859 | 17 JPA is a standard and Hibernate supports it. In other words, Hibernate is
one of JPA implementations.
【在 g***l 的大作中提到】 : How about Java Persistence API?
|
r*****l 发帖数: 2859 | 18 This always comes down to flexibility vs standard/convention. A real good
developer can take advantage of straight JDBC's flexibility and write good
code that outperforms Hibernate. However, real good developers are rare and
for most of us, using Hibernate will yield better results.
【在 g*****g 的大作中提到】 : That's not exactly true. ORM allows a simple way to do caching, : that can reduce DB hits in many cases. Of course an ORM generated : SQL batch cannot beat carefully hand-written ones, but there's a : reason stored procesure is not popular these days. : : your
|
T*********g 发帖数: 496 | 19 don't think so. Take Hibernate for example, stateless session is
specifically designed for batch processing, which will by pass the session
level cache and second level cache.
your
【在 s******e 的大作中提到】 : of course if you really care about your app performance. : ORM tools are never good for batch updates/insertions/deletions. They are : not designed to provide you performance. They are designed to simplify your : current and future development process.
|
m******e 发帖数: 1293 | 20 Jdbc's batch update /insert /delete is way faster than hibernate
【在 T*********g 的大作中提到】 : don't think so. Take Hibernate for example, stateless session is : specifically designed for batch processing, which will by pass the session : level cache and second level cache. : : your
|
T*********g 发帖数: 496 | 21 If you really got lots of data, why you consider jdbc? Normally, Db provides
some tools to load the data from some specific format file automatically,
which will increase the performance dramatically. |
s*******e 发帖数: 3042 | 22 批处理还是用Procedure方便,performance也好,就是多了之后维护太麻烦,尤其是有
人写的动辄几千行,就像一团乱麻那种,看着就头疼
provides
【在 T*********g 的大作中提到】 : If you really got lots of data, why you consider jdbc? Normally, Db provides : some tools to load the data from some specific format file automatically, : which will increase the performance dramatically.
|