Search Postgresql Archives

Re: Rows missing from table despite FK constraint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/1/8 Alban Hertroys <dalroi@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>:

> 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux