pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: PostgreSQL General <pgsql-general@lists.postgresql.org>
Subject: Re: Overloaded && operator from intarray module prevents index usage.
Date: Thu, 28 Feb 2019 22:56:37 -0600
Message-ID: <25e02082-6023-8669-c9f6-23d71e20abec@gmail.com> (raw)
In-Reply-To: <CAHOFxGq8wyqx_qMqdwUrvONmxcVnjfA8gOqXR7bo+pNokdm48g@mail.gmail.com>
References: <q583lv$5t8m$1@blaine.gmane.org>
	<10517.1551372290@sss.pgh.pa.us>
	<CAHOFxGpW7JkX8HGW4MFFrSagCdW08yM-DK1jZvRJnj7dp84m=A@mail.gmail.com>
	<1650.1551393260@sss.pgh.pa.us>
	<CAHOFxGpfEDExs0WvzmJUbC51T4KRqeAW_q3U=FSN7gj5zysBnQ@mail.gmail.com>
	<4364c5c4-da6f-a532-8a9b-c5f2a80b0882@gmail.com>
	<CAHOFxGpSztRRT2NAa68Ba4nMT6mx6FdJB+_NHAsu5c=CUyHQRA@mail.gmail.com>
	<16afa0dd-5520-34bd-0ea5-bedc8e2096cb@gmail.com>
	<CAHOFxGq8wyqx_qMqdwUrvONmxcVnjfA8gOqXR7bo+pNokdm48g@mail.gmail.com>

On 2/28/19 10:26 PM, Michael Lewis wrote:
>
>     Arrays are -- by definition -- not atomic, and so they fundamentally
>     break the model that relational databases are founded upon.  If you
>     want to be a good database designer, don't use arrays.
>
>
> Thanks. I was reading about Codd after your last email, but couldn't guess 
> at which point was objectionable. I'll have to keep that in mind and 
> always question when I come across an array or if I am ever tempted to use 
> one.
>
> While I can make more minor modifications to schema and suggest best 
> practices, I am not in the position to set or enforce policy within my 
> organization. The table and field in question are absolutely a mess and 
> this field in particular is actually an array of IDs of other records on 
> the same table (that actually represent another object that is similar but 
> not the same as the one containing the array of IDs).
>
> So, I am just looking to make the best of a bad situation currently and 
> understand how best to use the various tools available to me, with little 
> impact on the existing codebase but still getting performance benefits 
> from proper indexing. Thanks for sharing the additional context.
>

Don't worry.  I'm just in an especially "geezer" mood today.

-- 
Angular momentum makes the world go 'round.

view thread (15+ messages)  latest in thread

Message-ID: <25e02082-6023-8669-c9f6-23d71e20abec@gmail.com>
Permalink:  ../25e02082-6023-8669-c9f6-23d71e20abec@gmail.com/
Also on:    postgresql.org/message-id/25e02082-6023-8669-c9f6-23d71e20abec@gmail.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ronljohnsonjr@gmail.com
  Subject: Re: Overloaded && operator from intarray module prevents index usage.
  In-Reply-To: <25e02082-6023-8669-c9f6-23d71e20abec@gmail.com>
  References: <q583lv$5t8m$1@blaine.gmane.org> <10517.1551372290@sss.pgh.pa.us> <CAHOFxGpW7JkX8HGW4MFFrSagCdW08yM-DK1jZvRJnj7dp84m=A@mail.gmail.com> <1650.1551393260@sss.pgh.pa.us> <CAHOFxGpfEDExs0WvzmJUbC51T4KRqeAW_q3U=FSN7gj5zysBnQ@mail.gmail.com> <4364c5c4-da6f-a532-8a9b-c5f2a80b0882@gmail.com> <CAHOFxGpSztRRT2NAa68Ba4nMT6mx6FdJB+_NHAsu5c=CUyHQRA@mail.gmail.com> <16afa0dd-5520-34bd-0ea5-bedc8e2096cb@gmail.com> <CAHOFxGq8wyqx_qMqdwUrvONmxcVnjfA8gOqXR7bo+pNokdm48g@mail.gmail.com> <25e02082-6023-8669-c9f6-23d71e20abec@gmail.com>

* 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