select statment going slow and slow while using IN (xx,xx)

Поиск
Список
Период
Сортировка
От Yan Chunlu
Тема select statment going slow and slow while using IN (xx,xx)
Дата
Msg-id CAOA66tEDD2OpdyNBJpzN_9OxZQ2bE4S3Gn+wc45gY+DMyOz9Tw@mail.gmail.com
обсуждение исходный текст
Ответы Re: select statment going slow and slow while using IN (xx,xx)  (Yan Chunlu <springrider@gmail.com>)
Список pgsql-general
I am transforming a db with millions records to anther schema.  for
some reason I need to select the records using IN (xx,xx).

the ids in the IN was about 1000 recored every time, but I found the
query was getting slow while the selection moving on.

the shared buffer is 2048M.   and the cpu and io usage is as normal.

But while I am processing a smaller db on another machine, which only
has the default 24MB, the selection went very smooth.


here is the logs:

start... 0 limit:1000
selection time: 0.140721082687
sort_options
msgtime
start... 1000 limit:1000
selection time: 0.122759103775
start... 2000 limit:1000
selection time: 0.150802850723
start... 3000 limit:1000
selection time: 0.173918008804
start... 4000 limit:1000
selection time: 0.212812900543
start... 5000 limit:1000
selection time: 0.255054950714
start... 6000 limit:1000
selection time: 0.230540037155
start... 7000 limit:1000
selection time: 0.24426317215
start... 8000 limit:1000
selection time: 0.326669931412
start... 9000 limit:1000
selection time: 0.351358175278
start... 10000 limit:1000
selection time: 0.386382102966
start... 11000 limit:1000
selection time: 0.440491914749
start... 12000 limit:1000
selection time: 0.443608045578
start... 13000 limit:1000
selection time: 0.49751496315
start... 14000 limit:1000
selection time: 12.0050361156
start... 15000 limit:1000
selection time: 26.3596658707

start... 16000 limit:1000
selection time: 43.5269529819

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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Compiling C function with VC++ for Windows version
Следующее
От: Yan Chunlu
Дата:
Сообщение: Re: select statment going slow and slow while using IN (xx,xx)