Re: [HACKERS] Indexed views?

2004-09-06 Thread Tom Lane
Tiago Wright <[EMAIL PROTECTED]> writes: > For example, consider the view > CREATE VIEW vw_lot AS >  SELECT productid, lotid, parentlotid, lottype, lotname, productname >    FROM lot > NATURAL JOIN product; > where productname is in the product table, and lotname in the lot > table. I would be int

Re: [HACKERS] Indexed views?

2004-09-06 Thread Tiago Wright
I meant indexes on fields from multiple tables, or equivaltently indexes on a view spanning fields from multiple tables. For example, consider the view CREATE VIEW vw_lot AS  SELECT productid, lotid, parentlotid, lottype, lotname, productname    FROM lot NATURAL JOIN product; where productname is

Re: [HACKERS] Breakage in trigger.c

2004-09-06 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > On Mon, Sep 06, 2004 at 05:55:29PM -0400, Tom Lane wrote: >> Finally, surely the "Mark the event done" case should advance >> prev_event? As-is the code is capable of messing up the list links. > Not sure. Why doesn't the other arm of that conditional

Re: [HACKERS] Breakage in trigger.c

2004-09-06 Thread Alvaro Herrera
On Mon, Sep 06, 2004 at 05:55:29PM -0400, Tom Lane wrote: > I can't believe that the coding at trigger.c line 2010 ff is correct: > > /* > * Skip executing cancelled events, and events done by > * transactions that are not aborted. > */ > if (!(event->dte

[HACKERS] Breakage in trigger.c

2004-09-06 Thread Tom Lane
I can't believe that the coding at trigger.c line 2010 ff is correct: /* * Skip executing cancelled events, and events done by * transactions that are not aborted. */ if (!(event->dte_event & TRIGGER_DEFERRED_CANCELED) || (event->dte_event & T

[HACKERS] SetQuerySnapshot redesign: yet another try

2004-09-06 Thread Tom Lane
I know you've heard about this before, for instance in http://archives.postgresql.org/pgsql-hackers/2002-06/msg00452.php http://archives.postgresql.org/pgsql-bugs/2004-08/msg00304.php http://archives.postgresql.org/pgsql-general/2004-04/msg00555.php but here is another try at redefining what we wan

Re: [HACKERS] huge execution time difference with almost same plan

2004-09-06 Thread Gaetano Mendola
Tom Lane wrote: Tatsuo Ishii <[EMAIL PROTECTED]> writes: BTW, in 8.0 table spaces allow a table and an index to be placed on different disk devices, which may improve the performance. Is it possible that planner accounts for this in the future. I'm not sure how we could model it in any useful way

Re: [HACKERS] APR 1.0 released

2004-09-06 Thread Andrew Dunstan
Reini Urban wrote: FYI: WIN32 is also defined because is included. (/usr/incluse/w32api/windef.h) If you want this or that, do proper nesting, and use #else. Ugh, yes. A little experimentation shows that __WIN32__ is defined for MinGW only, but WIN32 is for both. I wonder how we missed that

Re: [HACKERS] Indexed views?

2004-09-06 Thread Joshua D. Drake
Tiago Wright wrote: Are there any plans to support indexed views, or cross-table indexes, or any form of "materialized views" in postgresql? How complex would the implementation be? Indexed views are sometimes the best way to improve the performance of complex queries. The planner will use an in

Re: [HACKERS] huge execution time difference with almost same plan

2004-09-06 Thread Tom Lane
Tatsuo Ishii <[EMAIL PROTECTED]> writes: > BTW, in 8.0 table spaces allow a table and an index to be placed on > different disk devices, which may improve the performance. Is it > possible that planner accounts for this in the future. I'm not sure how we could model it in any useful way ...

Re: [HACKERS] APR 1.0 released

2004-09-06 Thread Reini Urban
Andrew Dunstan schrieb: Reini Urban said: Bruce Momjian schrieb: I looked at the APR code to get some ideas for the Win32 port. Some of the ideas were good, but in other places like rename they didn't do very well we were better off doing it ourselves and getting it right. I remember looking at th

Re: [HACKERS] APR 1.0 released

2004-09-06 Thread Andrew Dunstan
Reini Urban said: > Bruce Momjian schrieb: >> I looked at the APR code to get some ideas for the Win32 port. Some >> of the ideas were good, but in other places like rename they didn't do >> very well we were better off doing it ourselves and getting it right. >> >> I remember looking at their cod

Re: [HACKERS] huge execution time difference with almost same plan

2004-09-06 Thread Tatsuo Ishii
Sorry for the delay. I was out of town last night. > What can you tell us about the physical ordering of the tables involved? > The only way I can think of to explain these results is that "orders" > is more or less physically in order by its primary key, and "lineitem" > is also more or less orde

Re: [HACKERS] Adding columns in the middle of tables

2004-09-06 Thread Jaime Casanova
--- Tom Lane <[EMAIL PROTECTED]> escribió: > We looked at this and decided that it would be > vastly more trouble than > it's worth --- not only in terms of effort to > implement the feature > originally, but in ongoing maintenance and risk of > bug creation. > > For instance, the original propo

Re: [HACKERS] APR 1.0 released

2004-09-06 Thread Reini Urban
Bruce Momjian schrieb: I looked at the APR code to get some ideas for the Win32 port. Some of the ideas were good, but in other places like rename they didn't do very well we were better off doing it ourselves and getting it right. I remember looking at their code to fix the rename/unlink while th