Re: Arrays and foreign keys

From: Chris Bitmead <chrisb(at)nimrod(dot)itg(dot)telstra(dot)com(dot)au>
To: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Arrays and foreign keys
Date: 2000-08-11 02:06:39
Message-ID: 39935FAF.C2B3A4A1@nimrod.itg.telecom.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Stephan Szabo wrote:

> > Ah yes. I guess that's a problem crying out for a new indexing solution.
>
> Yeah, and it would probably need some associated cost estimation stuff,
> since you'd need to know something about the element value rarity
> instead of the array value rarity if you wanted to make intelligent guesses
> as to whether the index scan is better than the sequential scan.

You could probably do some kind of quick hack with regular indexes, just
have more than one entry for each tuple when indexing arrays.

> You could kind of store the information in a secondary relation, but that
> seems like a major point of locking contention, plus it'd either end up
> being the reverse index (element->array of oids) or the normalized,
> element->oid rows at which point are you better off than if you
> normalized the original relation.
>
> Does any version of SQL have meaningful arrays, and do they actually
> specify any behavior for this? Or for that matter, what about other
> dbs. What do they do with these cases...

All ODBMSes by necessity support arrays. I'm not aware of any attempt to
index them in this way or support referential integrity. It would
probably be a postgresql first.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephan Szabo 2000-08-11 02:35:40 Re: Arrays and foreign keys
Previous Message Stephan Szabo 2000-08-11 02:02:13 Re: Arrays and foreign keys