Re: [SQL] marking tuples

2007-12-05 Thread Ehab Galal
ql-sql@postgresql.org > Subject: Re: marking tuples > From: [EMAIL PROTECTED] > Date: Wed, 5 Dec 2007 08:44:15 +0000 > > "Ehab Galal" <[EMAIL PROTECTED]> writes: > > > In my algorithm, each NewJoin node may "mark" its ps_ResultTupleSlot with > &

[SQL] marking tuples

2007-12-04 Thread Ehab Galal
Hi, I am implementing a new algorithm inside postgresql for a side research project. I am just wondering if anyone may give me few hints about the following problem: Consider the following plan: NewAggregate ->NewJoin ->NewJoin ->NewJoin ->Se

[SQL] materialize

2007-11-26 Thread Ehab Galal
Greetings, I was wondering why do we need the Materialize node in the plan below when i explain a query? 1: QUERY PLAN = "Nested Loop (cost=10.99..24.34 rows=1 width=846)"(typeid = 25, len = -1, typmod = -1, byval = f) 1: QUERY PLAN = " Join Filter: (("inner".cover)::text = ("

Re: [SQL] omitting redundant join predicate

2007-11-05 Thread Ehab Galal
Thanks a lot. > To: [EMAIL PROTECTED] > CC: pgsql-sql@postgresql.org > Subject: Re: [SQL] omitting redundant join predicate > Date: Sun, 4 Nov 2007 11:35:36 -0500 > From: [EMAIL PROTECTED] > > Ehab Galal <[EMAIL PROTECTED]> writes: > > explain select *

[SQL] omitting redundant join predicate

2007-11-04 Thread Ehab Galal
I tried the following query explain select * from t1, t2, t3 where t1.f <= t2.f and t2.f <= t3.f and t1.f <= t3.f; And that's what I got: Nested Loop (cost=0.00..3.15 rows=1 width=368) Join Filter: (("outer".f <= "inner".f) AND ("inner".f <= "outer".f)) -> Nested

[SQL] SQL command join question

2006-11-29 Thread Ehab Galal
Hi, I have three tables t1(a, b, c, d), t2(a, b, c, k), and t3(c, e). I need to outer join them as shown below, but only have all tuples from t1 as output. But the following syntax does not allow me to do so. SELECT t1.* FROM (t1 outer join t2 on (t1.a=t2.a and t1.b=t2.b)) t outer join t3 on