Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-announcepgsql-hackerspgsql-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

pgsql-announce by date

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

pgsql-hackers by date

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

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group