Query optimization

Поиск
Список
Период
Сортировка
От Eduardo Vázquez Rodríguez
Тема Query optimization
Дата
Msg-id 59B41C14544D314889E6FA384A307A9293EB26@osiris.insys-corp.com.mx
обсуждение исходный текст
Список pgsql-novice
Hello Postgres users

I have a question regarding the optimization of a query, I have a table that
contains approximately 14 millions of rows and I want to retrieve the
following information;

SELECT username, sum(bytes_used) AS TOTAL
FROM BIGTABLE
GROUP BY username
LIMIT 100;

Username is an Index varchar
bytes_used is float8 type

But it is really slow, it has been running for 1 hour and it simply does not
ends.

While the query is running, the table is been updating with more rows.

How can I improve it?

Thanks in advanced

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

Предыдущее
От: "Iain"
Дата:
Сообщение: Re: [ADMIN] PostgreSQL Errors...
Следующее
От: "Dan Quaroni"
Дата:
Сообщение: Copy can't parse a float?