Re: [PERFORM] View not using index

2005-06-13 Thread Tom Lane
Yves Vindevogel <[EMAIL PROTECTED]> writes: > rvponp=# explain select * from vw_document_pagesperjob limit 10 ; >QUERY PLAN > > -- > Limit (cost=82796.59..827

Re: [PERFORM] View not using index

2005-06-13 Thread Yves Vindevogel
Note the last query below (prev post) There it does use the index rvponp=# create type tpJobsPerDay as rvponp-# ( documentname varchar(1000), rvponp(# eventdate date, rvponp(# eventtime time, rvponp(# loginuser varchar(255), rvponp(# pages varchar(20) rvponp(# ) ; CREATE TYPE rvponp=# create func

Re: [PERFORM] View not using index

2005-06-13 Thread Russell Smith
Please CC the list. On Mon, 13 Jun 2005 05:11 pm, Yves Vindevogel wrote: > create or replace view vw_document_pagesperjob as > select documentname, eventdate, eventtime, loginuser, > fnFormatInt(pages) as pages > from tblPrintjobs > order by descpages, documentname ; > > rvponp=# explain sel

Re: [PERFORM] View not using index

2005-06-13 Thread Yves Vindevogel
rvponp=# explain select * from vw_document_pagesperjob ; QUERY PLAN Subquery Scan vw_document_pagesperjob (cost=82796.59..90149.20 rows=588209 width=706) -> Sort (cost=

Re: [PERFORM] View not using index

2005-06-13 Thread Russell Smith
On Mon, 13 Jun 2005 04:54 pm, Yves Vindevogel wrote: > Still, when I use explain, pg says it will first sort my tables instead > of using my index > How is that possible ? Can we see the output of the explain analyze? The definition of the view? Regards Russell Smith --

[PERFORM] View not using index

2005-06-13 Thread Yves Vindevogel
Hi, I have a view that has something like this: select x, y, z from tbl order by x, y I have created a special index on x + y I have run analyze Still, when I use explain, pg says it will first sort my tables instead of using my index How is that possible ? When I do explain select x,y,z from