Re: Rows missing from table despite FK constraint

Поиск
Список
Период
Сортировка
От Konrad Garus
Тема Re: Rows missing from table despite FK constraint
Дата
Msg-id 6645f6441001110330s29e67d29t46f9e29fc011bd9c@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Rows missing from table despite FK constraint  (Alban Hertroys <dalroi@solfertje.student.utwente.nl>)
Ответы Re: Rows missing from table despite FK constraint  (Konrad Garus <konrad.garus@gmail.com>)
Список pgsql-general
2010/1/8 Alban Hertroys <dalroi@solfertje.student.utwente.nl>:

> Did you turn off seqscans in the postgres.conf?

Seq scan is enabled.

> Could you try a "REINDEX TABLE attachment" again in case you somehow reindexed the wrong index or table?

How about this test?

On a dump from before the rows were gone:

# select count(*) from attachment where when_uploaded < '2010-01-01';
  count
----------
 22523642
(1 row)

On production database:

# explain select count(*) from attachment where when_uploaded < '2010-01-01';
                                      QUERY PLAN
--------------------------------------------------------------------------------------
 Aggregate  (cost=1794931.20..1794931.21 rows=1 width=0)
   ->  Seq Scan on attachment  (cost=0.00..1738076.24 rows=22741985 width=0)
         Filter: (when_uploaded < '2010-01-01 00:00:00'::timestamp
without time zone)
(3 rows)

# select count(*) from attachment where when_uploaded < '2010-01-01';
  count
----------
 22523639
(1 row)



--
Konrad Garus

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

Предыдущее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: Table appears on listing but can't drop it
Следующее
От: Ivan Sergio Borgonovo
Дата:
Сообщение: Re: R: aggregate over tables in different schema