Re: Much Ado About COUNT(*) - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Much Ado About COUNT(*)
Date
Msg-id 1105584309.2886.410.camel@jeff
Whole thread Raw
In response to Re: Much Ado About COUNT(*)  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Responses Re: Much Ado About COUNT(*)
List pgsql-hackers
> That mechanism exists right now, and it's called TOAST, dubbed the best
> thing since sliced bread.  We even have documentation for it, new as of
> our latest RC:
> 
> http://developer.postgresql.org/docs/postgres/storage-toast.html
> 

Thanks for the link. It looks like it breaks it up into chunks of about
2KB. I think the conversation was mostly assuming the tables were
somewhat closer to the size of an index. If you have more than 2KB per
tuple, pretty much anything you do with an index would be faster I would
think.

My original concern was if I had a table like (x int) and then postgres
broke the visibility information away form that, that would cause
serious performance problems if postgres had to do a join just to do
"select ... where x = 5". Right?

But of course, we all love toast. Everyone needs to make those wide
tables once in a while, and toast does a great job of taking those
worries away in an efficient way. I am just saying that hopefully we
don't have to seqscan a table with wide tuples very often :)

Regards,Jeff Davis





pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_autovacuum w/ dbt2
Next
From: Greg Stark
Date:
Subject: Re: Much Ado About COUNT(*)