Re: Much Ado About COUNT(*)

From: Jeff Davis <jdavis-pgsql(at)empires(dot)org>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Much Ado About COUNT(*)
Date: 2005-01-13 02:45:09
Message-ID: 1105584309.2886.410.camel@jeff
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-announce pgsql-hackers pgsql-patches

> 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

In response to

Responses

Browse pgsql-announce by date

  From Date Subject
Next Message Greg Stark 2005-01-13 03:19:18 Re: Much Ado About COUNT(*)
Previous Message Rod Taylor 2005-01-12 22:03:58 Re: Much Ado About COUNT(*)

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2005-01-13 03:19:18 Re: Much Ado About COUNT(*)
Previous Message Tom Lane 2005-01-13 02:17:33 Re: pg_autovacuum w/ dbt2

Browse pgsql-patches by date

  From Date Subject
Next Message Greg Stark 2005-01-13 03:19:18 Re: Much Ado About COUNT(*)
Previous Message Rod Taylor 2005-01-12 22:03:58 Re: Much Ado About COUNT(*)