Re: why postgresql is so slow?

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: why postgresql is so slow?
Дата
Msg-id 200309201109.34306.dev@archonet.com
обсуждение исходный текст
Ответ на why postgresql is so slow?  ("Jinqiang Han" <postgresql@db.pku.edu.cn>)
Список pgsql-hackers
On Saturday 20 September 2003 10:38, Jinqiang Han wrote:
> hello, all.

This isn't really a hackers question - perhaps try the "general","sql" etc 
lists in future. This list is for questions about the source-code of PG.

> I have a table about 2 million rows. when I run "select * from table1" in
> psql, it will take me about 10 minutes to get the result. I wonder if
> postgresql can immediately return result like db2.

PG is returning *all* the rows you requested. If you want one row at a time, 
perhaps use a cursor.

> After that I create a index on  a column named id. The time executing
> "selct * from table1 where id=10" in psql is much faster than that of
> executing "select * from table1 where id <10" in psql. why?

Because there are more records returned? You don't supply enough information. 
If you'd like to repost to the general list, along with details of the tables 
and the output of EXPLAIN ANALYSE for your queries, I'll be glad to go into 
detail there.
--  Richard Huxton Archonet Ltd


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Jinqiang Han"
Дата:
Сообщение: why postgresql is so slow?
Следующее
От: Carlos Guzman Alvarez
Дата:
Сообщение: Re: Array Parameters on protocol 3.0