Thread: Poor performance with "large" table.

Poor performance with "large" table.

From
pgsql-gen Newsgroup (@Basebeans.com)
Date:
Subject: Poor performance with "large" table.
From: "Jack Gao" <weigao@hotmail.com>
 ===
Hi, List

I have two questions about PostgreSQL on Windows platform. I install
postgresql 7.2.1 from cygwin. and running psql from cygwin also.

1. I'm keeping get error message when I use psql to get "large" data. For
example, if one of my table has more than 74 records in it, when I run
"select * from tbl...." on psql, it give me "less: not found" message. Also,
if I run "\df" on psql, I got same message. But if I run "\df to_char", I
got the inform I want. Looks like psql can not showing too much data. But
what this error message mean, and how to fix it?

2. I have a table has about 208458 records in it, and I tried "vacuum
analyze" on my database before I doing this test.
When I run "explain select count(*) from tblTest;" it give me something
like:
============================================================================
========
NOTICE:  QUERY PLAN:

Aggregate  (cost=4618.73..4618.73 rows=1 width=0)
  ->  Seq Scan on tbltest  (cost=0.00..4097.58 rows=208458 width=0)

EXPLAIN
============================================================================
========
and I got result in seconds.

When I run "explain select * from tblTest;", it give me something like:
============================================================================
========
NOTICE:  QUERY PLAN:

Seq Scan on tbltest  (cost=0.00..4097.58 rows=208458 width=38)

EXPLAIN
============================================================================
========
But I got that error message after about 10 minutes.

200k record is not that large I think. Is it something wrong with my
installation?

I didn't got chance to test it on Linux platform yet, I will post the result
after I do the same test on Linux platform.

Thanks and regards,

Jack



Re: Poor performance with "large" table.

From
Holger Marzen
Date:
On Wed, 17 Apr 2002, pgsql-gen Newsgroup wrote:

> 1. I'm keeping get error message when I use psql to get "large" data. For
> example, if one of my table has more than 74 records in it, when I run
> "select * from tbl...." on psql, it give me "less: not found" message. Also,
> if I run "\df" on psql, I got same message. But if I run "\df to_char", I
> got the inform I want. Looks like psql can not showing too much data. But
> what this error message mean, and how to fix it?

The frontend seems to use "less" (an improved "more") as a pager if more
rows are returned than fit on one screen. Be sure to have "less"
installed and in your PATH.


Re: Poor performance with "large" table.

From
pgsql-gen Newsgroup (@Basebeans.com)
Date:
Subject: Re: [GENERAL] Poor performance with "large" table.
From: "Jack Gao" <weigao@hotmail.com>
 ===
Thanks for the reply, it's really helped.

Actually, after I installed less, I got another error message. "WARN:
terminal is not fully function.....". And I found that because of Rational
Rose, Rational Rose set envirement variable "TERM" to nutc, but cygwin need
it to be "cygwin".

Thanks again.

Jack

"Holger Marzen" <holger@marzen.de> wrote in message
news:mailman.1019032861.29298.pgsql-gen@basebeans.com...
> On Wed, 17 Apr 2002, pgsql-gen Newsgroup wrote:
>
> > 1. I'm keeping get error message when I use psql to get "large" data.
For
> > example, if one of my table has more than 74 records in it, when I run
> > "select * from tbl...." on psql, it give me "less: not found" message.
Also,
> > if I run "\df" on psql, I got same message. But if I run "\df to_char",
I
> > got the inform I want. Looks like psql can not showing too much data.
But
> > what this error message mean, and how to fix it?
>
> The frontend seems to use "less" (an improved "more") as a pager if more
> rows are returned than fit on one screen. Be sure to have "less"
> installed and in your PATH.
>