Re: Joining 2 tables with 300 million rows

Поиск
Список
Период
Сортировка
От Jeff Trout
Тема Re: Joining 2 tables with 300 million rows
Дата
Msg-id B2700001-9328-44C3-B90A-BFD49A6FC5F5@torgo.978.org
обсуждение исходный текст
Ответ на Re: Joining 2 tables with 300 million rows  (Amit V Shah <ashah@tagaudit.com>)
Список pgsql-performance
On Dec 8, 2005, at 5:01 PM, Amit V Shah wrote:

> Hi,
>
> The thing is, although it shows 0.15 seconds, when I run the actual
> query,
> it takes around 40-45 seconds (sorry I forgot to mention that). And
> then
> sometimes it depends on data. Some parameters have very less number of
> records, and others have lot more. I dont know how to read the
> "explan"
> results very well, but looked like there were no sequential scans
> and it
> only used indexes.
>

The planner will look at the data you used and it may decide to
switch the plan if it realizes your're quering a very frequent value.

Another thing that may be a factor is the network - when doing
explain analyze it doesn't have to transfer the dataset to the client.

--
Jeff Trout <jeff@jefftrout.com>
http://www.jefftrout.com/
http://www.stuarthamm.net/



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

Предыдущее
От: Jaime Casanova
Дата:
Сообщение: Re: Query not using index
Следующее
От: Frank Wiles
Дата:
Сообщение: Re: opinion on disk speed