Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #33106
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Performance JPA |
| Date | 2015-11-11 09:30 -0500 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <n1vjf2$gpn$1@speranza.aioe.org> (permalink) |
| References | (5 earlier) <n1b13k$rd7$1@dont-email.me> <87mvuui2ws.fsf@Equus.decebal.nl> <87si4e49ja.fsf@Equus.decebal.nl> <n1u3ne$hvk$1@speranza.aioe.org> <87k2pp3x11.fsf@Equus.decebal.nl> |
On 11/11/2015 12:50 AM, Cecil Westerhof wrote: > On Wednesday 11 Nov 2015 01:56 CET, Arne Vajhøj wrote: >> On 11/10/2015 2:07 AM, Cecil Westerhof wrote: >>> In principal database logging is going to be enabled, but I am >>> waiting already a week for this. >> >> If you enable logging of the generated SQL then you can start moving >> on instead of waiting for somebody else. > > The problem was that logging did not work. But I understood that they > solved the problem with that. Until know I was told to look at the > logging of the unit tests. I do not think that you can be sure that > unit tests will give an accurate representation of live behaviour. If the problem really is JPA generating bad SQL then I would say that there is a pretty big chance that you will spot it already in the unit tests. You are not looking for 10% fine tuning of SQL - you are looking for something big causing a x10 difference. Even if it did not come up with something definite then the exercise would give you a much better foundation for continuing the troubleshooting. >>> Yesterday I was told that the queries themselves do not take a lot >>> of time. >> >> If that is true, which it may not be, then that points to not >> being database. > > I found that even if they find it annoying I have to check and recheck > what I am told. For example the what I was told about the timings was > not correct. I was told 5 seconds with JDBC and 2 minutes with JPA. > That turned out to be 1 second and 19 seconds. Less of a difference, > but still way of. That sort of problems is unfortunately very common. >> Do you have any potential complications: * relations that pull in >> many extra rows without enabling lazy loading * relations that >> convert single object update into many row updates > > Not directly, no. Here is the strange part. There are some relations, > but they are manually fetched. In JDBC and JPA in the same way. So on > the one hand that should not be a problem. But on the other hand when > those fetches are disabled the JPA application is a lot faster. I think you should pick one of these cases. Look at the SQL in the JDBC version. And look at the generated SQL in the JPA version. >>> I think it is time for profiling. As long as we are not sure what >>> the problem is, it is impossible to solve it. Until now I never had >>> to profile in Java. We work with Eclipse Kepler and IBM WebSpere >>> Application Server v8.0. What are good resources to learn to >>> profile the code? >> >> I would start by getting that logging enabled. > > There was a problem with that, but I was yesterday notified that this > problem was solved. > > Something else: I do not think it could be a problem, but better save > as sorry. I read somewhere that using @EmbeddedId could result in a > performance hit. Is that true? If so what could be the reason for > this? Because there are quit a few entities that use @EmbeddedId. In very pure ORM then you would have a single synthetic PK field. But the other should work fine as well. No harm done in taking a quick look at the generated SQL though to verify that it turns out OK. Arne
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-02 09:47 +0100
Re: Performance JPA Silvio <silvio@internet.com> - 2015-11-02 14:23 +0100
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-03 07:52 +0100
Re: Performance JPA Martin Gregorie <martin@address-in-sig.invalid> - 2015-11-03 11:16 +0000
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-03 19:11 +0100
Re: Performance JPA Martin Gregorie <martin@address-in-sig.invalid> - 2015-11-03 19:15 +0000
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-04 09:28 +0100
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-10 08:07 +0100
Re: Performance JPA Silvio <silvio@internet.com> - 2015-11-10 10:35 +0100
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-11 06:20 +0100
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-11 09:32 -0500
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-10 19:56 -0500
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-11 06:50 +0100
Re: Performance JPA Martin Gregorie <martin@address-in-sig.invalid> - 2015-11-11 12:17 +0000
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-11 09:30 -0500
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-11 23:20 +0100
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-11 23:11 +0100
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-11 19:10 -0500
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-12 07:27 +0100
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-13 08:30 +0100
Re: Performance JPA Silvio <silvio@internet.com> - 2015-11-13 10:45 +0100
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-13 11:06 +0100
Re: Performance JPA Silvio <silvio@internet.com> - 2015-11-13 13:36 +0100
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-20 09:04 +0100
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-13 21:46 -0500
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-20 09:09 +0100
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-03 20:35 -0500
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-04 09:35 +0100
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-07 22:09 -0500
Re: Performance JPA Silvio <silvio@internet.com> - 2015-11-03 12:29 +0100
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-03 19:23 +0100
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-03 20:44 -0500
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-04 09:48 +0100
Re: Performance JPA Silvio <silvio@internet.com> - 2015-11-04 10:23 +0100
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-04 11:27 +0100
Re: Performance JPA Silvio <silvio@internet.com> - 2015-11-04 12:42 +0100
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-07 22:18 -0500
Re: Performance JPA Silvio <silvio@internet.com> - 2015-11-09 10:43 +0100
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-20 09:13 +0100
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-07 22:12 -0500
Re: Performance JPA Silvio <silvio@internet.com> - 2015-11-09 10:22 +0100
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-10 21:35 -0500
Re: Performance JPA Silvio <silvio@internet.com> - 2015-11-11 11:29 +0100
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-03 20:42 -0500
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-04 11:19 +0100
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-07 22:05 -0500
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-02 20:08 -0500
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-03 07:55 +0100
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-03 20:45 -0500
Re: Performance JPA Lew <lewbloch@gmail.com> - 2015-11-16 14:43 -0800
csiph-web