Need more speed from this.

Поиск
Список
Период
Сортировка
От Brian Avis
Тема Need more speed from this.
Дата
Msg-id 3BF97449.7040605@searhc.org
обсуждение исходный текст
Ответы Re: Need more speed from this.  (Martín Marqués <martin@bugs.unl.edu.ar>)
Re: Need more speed from this.  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-general
I hope someone can help me out with this.

Postgres 7.1.3
Solaris 2.8

I have a table called system_data setup like this.


     | server_id |  date  |  time  | data_type_id | data |
     |___________|________|________|______________|______|
     |           |        |        |              |      |
     |     26    | a date | a time |     8        |  98  |
     |           |        |        |              |      |
     -----------------------------------------------------


This table is indexed on server_id and data_type_id.

It currently has about 674,456 rows and is growing on a daily
basis.

The problem is that selects from this table are really slow.

For instance if I do this.

SELECT AVG(data) FROM system_data
        WHERE date BETWEEN CAST('2001-02-01' AS DATE)
            AND CAST ('2001-02-28' AS DATE)
        AND
            server_id = 26
        AND
            data_type_id = 8;

It will take several seconds to complete this select.

I need this type of data retrieval to be much faster if
possible.

Thanks in advance for any assistance.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: revoke all from public ?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] bug or change in functionality in 7.2?