pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim C. Nasby <jim@nasby.net>
To: Joshua D. Drake <jd@commandprompt.com>
Cc: Craig A. James <cjames@modgraph-usa.com>
Cc: Brian Herlihy <btherl@yahoo.com.au>
Cc: Postgresql Performance <pgsql-performance@postgresql.org>
Subject: Re: Simple join optimized badly?
Date: Tue, 10 Oct 2006 09:07:03 -0500
Message-ID: <20061010140702.GB72517@nasby.net> (raw)
In-Reply-To: <452B11FF.5020904@commandprompt.com>
References: <20061010011042.93217.qmail@web52308.mail.yahoo.com>
	<452B108C.7020703@modgraph-usa.com>
	<452B11FF.5020904@commandprompt.com>

On Mon, Oct 09, 2006 at 08:22:39PM -0700, Joshua D. Drake wrote:
> 
> > Imagine I got run over by a train, and someone was reading my code. 
> > Which would be easier for them to maintain: Code with weird SQL, or code
> > with sensible, well-written SQL and explicit hints?
> 
> You forgot the most important option:
> 
> Code with appropriate documentation about your weird SQL.
> 
> If you document your code, your argument is moot.

You apparently didn't read the whole email. He said he did document his
code. But his point is still valid: obscure code is bad even with
documentation. Would you put something from the obfuscated C contest
into production with comments describing what it does, or would you just
write the code cleanly to begin with?
-- 
Jim Nasby                                            jim@nasby.net
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)



view thread (56+ messages)  latest in thread

Message-ID: <20061010140702.GB72517@nasby.net>
Permalink:  ../20061010140702.GB72517@nasby.net/
Also on:    postgresql.org/message-id/20061010140702.GB72517@nasby.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: jim@nasby.net, jd@commandprompt.com, cjames@modgraph-usa.com, btherl@yahoo.com.au
  Subject: Re: Simple join optimized badly?
  In-Reply-To: <20061010140702.GB72517@nasby.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox