Re: [SQL] optimizing a query

2008-12-14 Thread Louis-David Mitterrand
On Sun, Dec 14, 2008 at 02:51:24PM -0800, Michal Szymanski wrote: > On 14 Gru, 20:22, vindex+lists-pgsql-...@apartia.org (Louis-David > Mitterrand) wrote: > > > > I have an 'event' table and an 'event_date' table pointing to it > > containing (potentially) several event dates (start and (optionnaly

[SQL] optimizing a query

2008-12-14 Thread Louis-David Mitterrand
Hi, I have an 'event' table and an 'event_date' table pointing to it containing (potentially) several event dates (start and (optionnaly) end) for the event in the past, present and future. I'm trying to build a query to select the most "relevant" date: 'current' or 'next' or 'last' (by order of

Re: [SQL] optimizing a query over tree-like structure

2008-09-30 Thread Oliveiros Cristina
or P, just with an F. Which info is to be retrieved, exactly in this case ? Best, Oliveiros - Original Message - From: <[EMAIL PROTECTED]> To: Sent: Tuesday, September 30, 2008 3:24 PM Subject: Re: [SQL] optimizing a query over tree-like structure another idea i just got, to dec

Re: [SQL] optimizing a query over tree-like structure

2008-09-30 Thread az
which, from my own > experience, I guess it has tendency to be slow... > > Best, > > Oliveiros > > - Original Message - > From: <[EMAIL PROTECTED]> > To: > Sent: Tuesday, September 30, 2008 9:32 AM > Subject: [SQL] optimizing a query over tree-like structure > &

Re: [SQL] optimizing a query over tree-like structure

2008-09-30 Thread Oliveiros Cristina
2008 9:32 AM Subject: [SQL] optimizing a query over tree-like structure hi. sorry for the vague syntax used below, but the query is huge so i've tried to present it in simple terms. And sorry if i'm doing obviously stupid things, i have lots of years programming behind me but NO sql i

[SQL] optimizing a query over tree-like structure

2008-09-30 Thread az
hi. sorry for the vague syntax used below, but the query is huge so i've tried to present it in simple terms. And sorry if i'm doing obviously stupid things, i have lots of years programming behind me but NO sql involved. i have a somewhat tree-like structure of objects that link to each other