[BUGS] BUG #2209: Low performan on consecutive selects

2006-01-25 Thread Fahri CAKIROGLU

The following bug has been logged online:

Bug reference:  2209
Logged by:  Fahri CAKIROGLU
Email address:  [EMAIL PROTECTED]
PostgreSQL version: 8.1
Operating system:   Windows nt 2000
Description:Low performan on consecutive selects
Details: 

Consecutive selects from three different tables
causes low performance(about 1500 ms).
Same select count from two tables gives good performance(about 30 ms).
All searched keys are indexed and individual execution 
of each query is very fast.

Slow query :
select * from orders where ordernum='1' order by ordernum limit 1;
select * from customers where custnum='1' order by custnum limit 1;
select * from invoice where invnum='1' order by invnum limit 1;

Query with good performance :
select * from orders where ordernum='1' order by ordernum limit 1;
select * from customers where custnum='1' order by custnum limit 1;
select * from orders where ordernum='2' order by ordernum limit 1;
select * from customers where custnum='2' order by custnum limit 1;

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


Re: [BUGS] BUG #2204: Feature Req: Unique output column names

2006-01-25 Thread Brandon Black
On 1/24/06, Alvaro Herrera <[EMAIL PROTECTED]> wrote:
> Tom Lane wrote:
>
> > I haven't looked at SQL99 or SQL2003, but most likely they say the same
> > thing in two or three times as many words ;-)
>
> Thanks for the pointer.  In SQL 2003, this is 7.12
> :
>
> 17) Case:
> a) If the i-th  in the  specifies an
> that contains a  CN, then the 
>of the i-th column of the result is CN.
> b) If the i-th  in the  does not specify an
> and the  of that  is a
>single column reference, then the  of the i-th column of
>the result is the  of the column designated by the
>column reference.
> c) Otherwise, the  of the i-th column of the specification> is implementation dependent.
>
> So they actually simplified the third rule and we comply with it!
>
>
> It would be nice to have this text in HTML or info format.  This PDF
> mess is really awkward.

Well, then the current behavior is kosher in SQL2003 then, but not
neccesarily for SQL92 if someone decided to define some literal column
names like "count" or "sum" :)

It's not a big deal, just seemed that in certain situations the way
other vendors have done it ( "count(x)", "count(y)"  ... or .. "1",
"2") at least avoid duplication in common cases.

-- Brandon

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


[BUGS] BUG #2208: Low performance on select

2006-01-25 Thread Fahri CAKIROGLU

The following bug has been logged online:

Bug reference:  2208
Logged by:  Fahri CAKIROGLU
Email address:  [EMAIL PROTECTED]
PostgreSQL version: 8.1
Operating system:   windows nt 2000
Description:Low performance on select
Details: 

Consecutive selects from three different tables
causes low performance(about 1500 ms).
Same select count from two tables gives good performance(about 30 ms).
All searched keys are indexed and individual execution 
of each query is very fast.

Slow query :
select * from orders where ordernum='1' order by ordernum limit 1;
select * from customers where custnum='1' order by custnum limit 1;
select * from invoice where invnum='1' order by inv limit 1;

Query with good performance :
select * from orders where ordernum='1' order by ordernum limit 1;
select * from customers where custnum='1' order by custnum limit 1;
select * from orders where ordernum='2' order by ordernum limit 1;
select * from customers where custnum='2' order by custnum limit 1;

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


[BUGS] BUG #2207: PG Database Server 8.1 Service doesnt start

2006-01-25 Thread Pramod Kudva

The following bug has been logged online:

Bug reference:  2207
Logged by:  Pramod Kudva
Email address:  [EMAIL PROTECTED]
PostgreSQL version: 8.1
Operating system:   Windows XP Professional
Description:PG Database Server 8.1 Service doesnt start
Details: 

This seems to be a problem since 8.0 and before .. I see a lot of forum
activity but never a solution.

I installed PG 8.1 with a non-admin user postgres on my windows xp pro
laptop. 

The service doesnt start - and stops saying 'Some services stop
automatically when they have nothing to do'. I do have the McAfee Internet
Suite 8.0 on  my machine but then this error continues even when the mcafee
is disabled.

Any help is very much appreciated.

thanks,

pramod

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [BUGS] BUG #2208: Low performance on select

2006-01-25 Thread Michael Fuhr
On Wed, Jan 25, 2006 at 12:32:31PM +, Fahri CAKIROGLU wrote:
> Consecutive selects from three different tables
> causes low performance(about 1500 ms).
> Same select count from two tables gives good performance(about 30 ms).

This might be due to caching.  When you query two tables all of the
pages you need might be cached, but when you query a third table
some of the pages from the other tables might be evicted from the
cache.  When you query one of those tables again the pages have to
be fetched from disk.

How big are the tables in question?

> All searched keys are indexed and individual execution 
> of each query is very fast.

Could you post the EXPLAIN ANALYZE output of each query?  Have you
tuned any of your postgresql.conf settings, in particular shared_buffers?
How much memory do you have?

-- 
Michael Fuhr

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings