Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #33222
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Using GROUP By or @OrderColumn in JPA |
| Date | 2015-11-28 23:01 -0500 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <n3dtae$4qa$1@speranza.aioe.org> (permalink) |
| References | <87bnai8pu7.fsf@Equus.decebal.nl> <n35lmq$mph$1@speranza.aioe.org> <87two9e0l7.fsf@Equus.decebal.nl> <n38b8u$br8$1@speranza.aioe.org> <56583e4f$0$23815$e4fe514c@news.xs4all.nl> |
On 11/27/2015 6:28 AM, Silvio wrote: > On 11/27/2015 02:22 AM, Arne Vajhøj wrote: >> Yes - I am arguing for a very simple solution. Unless you >> really have a performance problem that requires a complex >> solution then I strongly believe in keeping it simple. > > I usually agree on keeping things as simple as possible given the > circumstances. But I would be very hesitant to give this as general > advice to someone who is in a situation I do not know. > > I spoke of performance problems in ORM based applications here before. > Most of these where caused by an accumulation of many "keep it simple" > solutions. In my experience serious performance problems is rarely the cumulative effect of lots of non-optimized code but more a single or a few hot spot. Performance is known to be 20-80 but I actually think 5-95 is more common. > Sometimes the data had just outgrown the simple solution and the sheer > volume demanded a more optimal solution. For that to be a problem you will need something that is worse than O(n). As long as the stuff is O(n) then volume increase and hardware increase should work fine (volume increase without hardware increase is obviously still a problem but I would not consider that a software issue). Lots of stuff is worse than O(n) but database access should not be so. > In other cases each little simple solution seemed to do just fine but a > user action could result in tens of such simple actions being performed. > A database action that takes 0.2 second seems plausible and hardly > problematic. But use cases where consistently ~30 such actions will be > performed result in a six second hick-up. 0.2 second for a database operation is an eternity. > It's a very thin line between premature optimization and technical debt. Premature optimization is technical debt. > Only if you can reliably predict both the volume of the data and the use > case scenarios can one decide how many effort should be spent optimizing > things. It can be very difficult to predict load profile. But one can try ones best. And the compromise has to be made. For any real world application an attempt to make the application 100% optimal will guarantee that it will not be complete before it becomes obsolete. > Waiting for performance problems to happen in production before > optimizing may be acceptable in some situations but you can not afford > to take this approach system wide. You really take that approach for all applications. You just do your best to minimize risk based on experience and test. Arne
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Using GROUP By or @OrderColumn in JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-25 09:07 +0100
Re: Using GROUP By or @OrderColumn in JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-25 20:02 -0500
Re: Using GROUP By or @OrderColumn in JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-26 07:28 +0100
Re: Using GROUP By or @OrderColumn in JPA Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-26 08:25 -0500
Re: Using GROUP By or @OrderColumn in JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-26 20:22 -0500
Re: Using GROUP By or @OrderColumn in JPA Silvio <silvio@internet.com> - 2015-11-27 12:28 +0100
Re: Using GROUP By or @OrderColumn in JPA Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-27 09:22 -0500
Re: Using GROUP By or @OrderColumn in JPA Silvio <silvio@internet.com> - 2015-11-27 17:42 +0100
Re: Using GROUP By or @OrderColumn in JPA Silvio <silvio@internet.com> - 2015-11-27 17:43 +0100
Re: Using GROUP By or @OrderColumn in JPA Martin Gregorie <martin@address-in-sig.invalid> - 2015-11-27 18:21 +0000
Re: Using GROUP By or @OrderColumn in JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-28 23:01 -0500
Re: Using GROUP By or @OrderColumn in JPA Silvio <silvio@internet.com> - 2015-11-29 12:42 +0100
Re: Using GROUP By or @OrderColumn in JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-28 22:44 -0500
Re: Using GROUP By or @OrderColumn in JPA Martin Gregorie <martin@address-in-sig.invalid> - 2015-11-27 11:07 +0000
csiph-web