Re: [PERFORM] Stable function optimisation

2007-08-15 Thread Philipp Specht
Hi Tom, Thank you very much for your explanation. On 13.08.2007, at 23:01, Tom Lane wrote: Philipp Specht <[EMAIL PROTECTED]> writes: The biggest question here is: Why is the runtime of the query with the stable function not near the runtime of the immutable function? Stable functions don't

Re: [PERFORM] Indexscan is only used if we use "limit n"

2007-08-15 Thread Mark Lewis
On Wed, 2007-08-15 at 16:36 -0300, Sebastián Baioni wrote: > Hello, > Whe are running PostgreSQL 8.2.0 on amd64-portbld-freebsd6.2, compiled > by GCC cc (GCC) 3.4.6 [FreeBSD] 20060305. > The query only uses the index if we have a "limit n": > > Without "Limit n" > explain > select esapcuit, esapcu

Re: [PERFORM] Indexscan is only used if we use "limit n"

2007-08-15 Thread joao
which column does your indice cover? Em Qua, 2007-08-15 às 16:36 -0300, Sebastián Baioni escreveu: > Hello, > Whe are running PostgreSQL 8.2.0 on amd64-portbld-freebsd6.2, compiled > by GCC cc (GCC) 3.4.6 [FreeBSD] 20060305. > The query only uses the index if we have a "limit n": > > Without "Li

Re: [PERFORM] Indexscan is only used if we use "limit n"

2007-08-15 Thread Alvaro Herrera
Sebastián Baioni escribió: > Hello, > Whe are running PostgreSQL 8.2.0 on amd64-portbld-freebsd6.2, compiled by GCC > cc (GCC) 3.4.6 [FreeBSD] 20060305. > The query only uses the index if we have a "limit n": > Without "Limit n" > explain > select esapcuit, esapcuil > from esact00 t1 > order by e

[PERFORM] Indexscan is only used if we use "limit n"

2007-08-15 Thread Sebastián Baioni
Hello, Whe are running PostgreSQL 8.2.0 on amd64-portbld-freebsd6.2, compiled by GCC cc (GCC) 3.4.6 [FreeBSD] 20060305. The query only uses the index if we have a "limit n": Without "Limit n" explain select esapcuit, esapcuil from esact00 t1 order by esapcuit, esapcuil Sort (cost=843833.82..853