Re: Overloaded && operator from intarray module prevents index usage. - Mailing list pgsql-general

From Ron
Subject Re: Overloaded && operator from intarray module prevents index usage.
Date
Msg-id 25e02082-6023-8669-c9f6-23d71e20abec@gmail.com
Whole thread Raw
In response to Re: Overloaded && operator from intarray module prevents index usage.  (Michael Lewis <mlewis@entrata.com>)
Responses Re: Overloaded && operator from intarray module prevents index usage.  (Michael Lewis <mlewis@entrata.com>)
List pgsql-general
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.

pgsql-general by date:

Previous
From: Michael Lewis
Date:
Subject: Re: Overloaded && operator from intarray module prevents index usage.
Next
From: Michael Lewis
Date:
Subject: Re: Overloaded && operator from intarray module prevents index usage.