Re: [SQL] full join in view

2003-01-15 Thread Tambet Matiisen
If you need only not null-kdt_id and dor_id, then just change your joins into inner joins. The whole idea is to show expected expenses (in koostude_detailid) even if they were actually not spent (the same material is not listed in dokumentide_read). And also show actual expenses (in

Re: [SQL] full join in view

2003-01-14 Thread Tambet Matiisen
Can you add some sql examples - table index definition, view definition? If your view doesn't contain other views or sub-selects, postgres should use indexes. Tomasz Myrta You are right. After disabling seq_scan, it uses indexes just as you described. Unfortunately my view happens

Re: [SQL] full join in view

2003-01-14 Thread Tomasz Myrta
Tambet Matiisen wrote: You are right. After disabling seq_scan, it uses indexes just as you described. Unfortunately my view happens to use subquery: Don't disable seq_scan - sometimes it is better than indexscan. I had the same problem as you - find subject sub-select with aggregate on

Re: [SQL] full join in view

2003-01-14 Thread Tambet Matiisen
To: Tambet Matiisen Cc: [EMAIL PROTECTED] Subject: Re: [SQL] full join in view Tambet Matiisen wrote: You are right. After disabling seq_scan, it uses indexes just as you described. Unfortunately my view happens to use subquery: Don't disable seq_scan - sometimes it is better than

Re: [SQL] full join in view

2003-01-14 Thread jasiek
On Tue, Jan 14, 2003 at 04:27:22PM +0200, Tambet Matiisen wrote: First I would like to say, that I'm quite amazed. You even guessed table names right! :) I did not expect such an in-depth analysis in such a short time. Thanks, Tomasz! It wasn't difficult - these names where in foreign keys

[SQL] full join in view

2003-01-08 Thread Tambet Matiisen
I'm making a report in Crystal Reports, which makes use of full join. As Crystal Reports does not support full join natively, I created a view which contains the join and based my report on that view. The report has also a parameter to filter only subset of rows from view. My problem is, that

Re: [SQL] full join in view

2003-01-08 Thread Tomasz Myrta
Tambet Matiisen wrote: I'm making a report in Crystal Reports, which makes use of full join. As Crystal Reports does not support full join natively, I created a view which contains the join and based my report on that view. The report has also a parameter to filter only subset of rows from