Re: Converting MySQL tinyint to PostgreSQL

From: Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>
To: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
Subject: Re: Converting MySQL tinyint to PostgreSQL
Date: 2005-07-16 22:18:24
Message-ID: 42D987B0.3060805@cheapcomplexdevices.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jim C. Nasby wrote:
>On Thu, Jul 14, 2005 at 11:29:23PM +0200, Martijn van Oosterhout wrote:
>>On Thu, Jul 14, 2005 at 11:30:36AM -0500, Jim C. Nasby wrote:
>>>On Wed, Jul 13, 2005 at 07:52:04PM -0400, Bruce Momjian wrote:
>>>
>>>>This is a good point. We have always stored data on disk that exactly
>>>>matches its layout in memory. We could change that, but no one has
>>>>shown it would be a win.
>>>
>>[...]
>
> My thought was to convert as pages were read and written. That should
> minimize the code impact.

If that were practical, even more radical I/O saving tricks might be
possible beyond removing alignment bytes - like some compression algorithm.

Jim C. Nasby wrote:
> Or maybe as an alternative, would it be possible to determine how much
> space in a given relation was being wasted due to padding? That could be
> used to figure out how much IO could be saved on different transactions.

Well, I do notice that if I gzip my larger tables's data files they
tend to compress between 80-95% so it seems there's a fair amount of
redundancy in at least some tables.

Has anyone tried running postgresql on a filesystem that does compression?

It seems that would be an easy way to guess at the ultimate
potential I/O savings of separating memory layout from disk layout.

Ron

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Mayer 2005-07-16 22:22:27 Re: How to create unique constraint on NULL columns
Previous Message Michael Schmidt 2005-07-16 21:58:29 Re: How to create unique constraint on NULL columns