Re: [PERFORM] question about partial index

2014-03-18 Thread Szymon Guz
On 18 March 2014 22:26, Yu Zhao wrote: > In PostgreSQL 9.3.3 Documentation 11.8. Partial Indexes Example 11-2 > (http://www.postgresql.org/docs/9.3/interactive/indexes-partial.html), > the partial index is created > > CREATE INDEX orders_unbilled_index ON orders (order_nr) WHERE billed > is not t

[PERFORM] question about partial index

2014-03-18 Thread Yu Zhao
In PostgreSQL 9.3.3 Documentation 11.8. Partial Indexes Example 11-2 (http://www.postgresql.org/docs/9.3/interactive/indexes-partial.html), the partial index is created CREATE INDEX orders_unbilled_index ON orders (order_nr) WHERE billed is not true; And the suggested use mode is SELECT * FROM o

Re: [PERFORM] Help me understand why my subselect is an order of magnitude faster than my nested joins

2014-03-18 Thread Vincent
On 03-03-14 19:24, Eli Naeher wrote: Hello, I have two versions of essentially the same query; one using nested joins, the other using subselects. The version using the subselect is roughly an order of magnitude faster (~70ms on my box and data vs ~900ms for the nested joins). Of course the o