On Wed, Oct 29, 2008 at 9:18 PM, Kevin Galligan <kgalligan@xxxxxxxxx> wrote: > I'm approaching the end of my rope here. I have a large database. > 250 million rows (ish). Each row has potentially about 500 pieces of > data, although most of the columns are sparsely populated. > *snip* > > So, went the other direction completely. I rebuilt the database with > a much larger main table. Any values with 5% or greater filled in > rows were added to this table. Maybe 130 columns. Indexes applied to > most of these. Some limited testing with a smaller table seemed to > indicate that queries on a single table without a join would work much > faster. > > So, built that huge table. now query time is terrible. Maybe a > minute or more for simple queries. Are indexes on sparsely populated columns already handled efficiently, or could partial indexes with only non-null values improve things? Isak -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general