Re: PostgreSQL 8.0 Feature List? - Mailing list pgsql-general
From | Richard Welty |
---|---|
Subject | Re: PostgreSQL 8.0 Feature List? |
Date | |
Msg-id | Mahogany-0.66.0-2268-20040814-142752.00@averillpark.net Whole thread Raw |
In response to | Re: PostgreSQL 8.0 Feature List? (Jan Wieck <JanWieck@Yahoo.com>) |
Responses |
Re: PostgreSQL 8.0 Feature List?
Re: PostgreSQL 8.0 Feature List? Re: PostgreSQL 8.0 Feature List? |
List | pgsql-general |
On Sat, 14 Aug 2004 12:03:21 -0400 Jan Wieck <JanWieck@Yahoo.com> wrote: > On 8/12/2004 8:53 PM, Richard Welty wrote: > > On Thu, 12 Aug 2004 14:36:13 -0400 Vivek Khera <khera@kcilink.com> wrote: > >> >>>>> "RW" == Richard Welty <rwelty@averillpark.net> writes: > >> RW> i'm quite experienced in C and Java, so it's going to be in one of > >> RW> those two. any comments from anyone on the language choice? > > > >> eRServer is written in Java. It sucks up about 200Mb+ virtual memory > >> for a teeny-tiny little database. I'd avoid java :-) > > > > java often sucks up too much memory. java doesn't have to suck > > up too much memory, it just usually gets written that way. > Right. The garbage collection automatically taking care of unreferenced > objects as a stop-gap for resource leakage is abused by lazy programmers > as a general purpose cleanup mechanism. some of it is this, certainly. some of it is bad education. i was a professional lisp programmer for some 10+ years. lisp, of course, has the ancestral garbage collection scheme, and the lisp garbage collectors at this juncture are very, very, very good, much more mature than java's garbage collector. nonetheless, lisp programmers who understand what is going on are exceedingly careful not to taunt the garbage collector if they want their app to go fast. the authors of 98%-99% of all introductory java textbooks have a lot to answer for. my favorite example of the lot is that they all teach programmers to use String in the following manner: String query = "SELECT foo " + "FROM bar " + "WHERE baz = 'bletch';" return query; nowhere do these books ever mention StringBuffer. now java programmers who have developed a sufficient clue set know that String is hopelessly inefficient and will instead write the much preferable: StringBuffer query = new StringBuffer(); query.append( "SELECT foo "); query.append( "FROM bar "); query.append( "WHERE baz = 'bletch';" return new String( query); which not only is much more efficient, but Does Not Taunt The Garbage Collector. i kind of like _Practical Java_ (Peter Haggar, Addison Wesley) for its coverage of these details, as well as _Bitter Java_ (Bruce Tate, Manning) for its discussion of how naive programmers writing Java web apps can (and often do) go seriously wrong (it talks a lot about efficient use of database backends, providing relevance to PostgreSQL and this mailing list.) richard -- Richard Welty rwelty@averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security
pgsql-general by date: