From: | Jasen Betts <jasen(at)xnet(dot)co(dot)nz> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: efficient trigger function selection? |
Date: | 2012-04-14 22:54:20 |
Message-ID: | jmcv6s$imn$1@reversiblemaps.ath.cx |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 2012-04-11, Kenneth Tilton <ktilton(at)mcna(dot)net> wrote:
> We are simulating a graph DB in Postgres and would have one RDF-like table
> with columns as described above. If we want a trigger on what is
> conventionally a column for "color", with pseudo-RDF we would have:
>
> create trigger ... when predicate = 'color'
>
> Since the graph data model reduces *everything *into so many RDF "triples",
> almost every trigger function in the application would be "when predicate =
> X".
>
> well, let's see how many we really get before we panic. :)
>
> Thx for the input.
partition your large table on on "predicate"
if priactical do a 1:1 partitioning. that way only the apropriate
triggers will be tested, and furthermore most queries will be
optimised by constraint exclusion. And your database will magically
transform from something approximating EAV to something close to 4NF.
--
⚂⚃ 100% natural
From | Date | Subject | |
---|---|---|---|
Next Message | Jasen Betts | 2012-04-15 00:24:19 | Re: Updating pg_attribute to change field's data type from integer to bigint on very large table |
Previous Message | Ray Stell | 2012-04-14 21:28:41 | Re: Any information about the PostgreSQL Certified Engineer program? |