Re: Index usage on OR queries

From: Tore Halvorsen <tore(dot)halvorsen(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Index usage on OR queries
Date: 2011-08-31 14:41:17
Message-ID: CADGw-SdrYq87UvtG9OxG+1i4vyxjOOK_W-xePM6cavC-Bx0pgA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
> -- This can be optimized by using CTEs
> with am as (
> select * from a where time >= '2011-08-15'
> )
> , bm as (
> select * from b where time >= '2011-08-15'
> )
> select * from am join bm using(id)
>

Disregard this, it doesn't to the same at all.

Now I'm more confused as to how I can optimize the query.

--
Eld på åren og sol på eng gjer mannen fegen og fjåg. [Jøtul]
<demo> 2011 Tore Halvorsen || +052 0553034554

In response to

Browse pgsql-general by date

  From Date Subject
Next Message edwardIshaq 2011-08-31 14:46:11 Re: how do I disable automatic start on mac os x?
Previous Message Tore Halvorsen 2011-08-31 14:35:30 Index usage on OR queries