Re: [SQL] Performance inside and outside view ( WAS Re: Select the

2002-09-12 Thread Stephan Szabo
On Thu, 12 Sep 2002, Tom Lane wrote: > "Gaetano Mendola" <[EMAIL PROTECTED]> writes: > > Yes that's right it's help me, > > but here the optimizer have some problems: > > What's the datatype of id_user, and why are you quoting the compared > constant in some cases but not others? I don't think

Re: [SQL] Performance inside and outside view ( WAS Re: Select the

2002-09-12 Thread Stephan Szabo
On Thu, 12 Sep 2002, Gaetano Mendola wrote: > > "Tom Lane" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > "Gaetano Mendola" <[EMAIL PROTECTED]> writes: > > > Yes that's right it's help me, > > > but here the optimizer have some problems: > > > > What's the

Re: [SQL] Performance inside and outside view ( WAS Re: Select the

2002-09-12 Thread Tom Lane
Stephan Szabo <[EMAIL PROTECTED]> writes: > On Thu, 12 Sep 2002, Tom Lane wrote: >> What's the datatype of id_user, and why are you quoting the compared >> constant in some cases but not others? I don't think the difference >> has anything to do with the view here ... > At least in current sourc

[SQL] Performance inside and outside view ( WAS Re: Select the max on a field )

2002-09-12 Thread Gaetano Mendola
"Stephan Szabo" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > select distinct on (att_2) * from test > order by att_2, att_1 desc; Yes that's right it's help me, but here the optimizer have some problems: CREATE VIEW last_user_logs AS SELECT DISTINCT ON (i

Re: [SQL] Performance inside and outside view ( WAS Re: Select the max on a field )

2002-09-12 Thread Tom Lane
"Gaetano Mendola" <[EMAIL PROTECTED]> writes: > Yes that's right it's help me, > but here the optimizer have some problems: What's the datatype of id_user, and why are you quoting the compared constant in some cases but not others? I don't think the difference has anything to do with the view he

Re: [SQL] Performance inside and outside view ( WAS Re: Select the max on a field )

2002-09-12 Thread Gaetano Mendola
"Tom Lane" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > "Gaetano Mendola" <[EMAIL PROTECTED]> writes: > > Yes that's right it's help me, > > but here the optimizer have some problems: > > What's the datatype of id_user, and why are you quoting the compared >