pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedPartitioning and Foreign Keys
2+ messages / 2 participants
[nested] [flat]
* Partitioning and Foreign Keys
@ 2007-11-04 17:57 Volkan YAZICI <yazicivo@ttnet.net.tr>
0 siblings, 1 reply; 2+ messages in thread
From: Volkan YAZICI @ 2007-11-04 17:57 UTC (permalink / raw)
To: pgsql-sql
Hi,
We have a customers database growing ~1,000 rows per day. (Nearly, %40
of the table is garbage and won't get queried that often in the
future. But we keep them for statistical analysing purposes of
previous jobs.) Despite table allocates relatively small size on the
disk, requirement of instantaneous query execution times forms our
major bottleneck. I planned to partition this table, but I learnt that
PostgreSQL doesn't allow referencing views. Does anybody have any
suggestions?
Regards.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Partitioning and Foreign Keys
@ 2007-11-08 16:45 Vivek Khera <vivek@khera.org>
parent: Volkan YAZICI <yazicivo@ttnet.net.tr>
0 siblings, 0 replies; 2+ messages in thread
From: Vivek Khera @ 2007-11-08 16:45 UTC (permalink / raw)
To: pgsql-sql
On Nov 4, 2007, at 12:57 PM, Volkan YAZICI wrote:
> major bottleneck. I planned to partition this table, but I learnt that
> PostgreSQL doesn't allow referencing views. Does anybody have any
> suggestions?
>
I can envision writing your own custom trigger instead of using the
stock FK trigger that knows which sub-table to check for the FK
reference. Then add that as an insert/update trigger on your
referencing table.
I will be investigating this approach in the next few months; right
now I don't have need for this particular case.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2007-11-08 16:45 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-11-04 17:57 Partitioning and Foreign Keys Volkan YAZICI <yazicivo@ttnet.net.tr>
2007-11-08 16:45 ` Vivek Khera <vivek@khera.org>
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