Re: Indexes and Views

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: R D <mrk279(at)yahoo(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Indexes and Views
Date: 2001-02-24 16:35:55
Message-ID: 11932.983032555@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

R D <mrk279(at)yahoo(dot)com> writes:
> i'm storing col1 to col3 as integers to save storage
> space(infact they are fixed point).I have many tables
> ctrated using this template only the view devidor
> constants are different for each table. Here they are
> 1000.0 1000.0 and 100.0 but for every table they are
> different. I would like to be able to execute the
> queryes like this using the index:

This table design is sufficiently ugly and pointless that I feel no deep
remorse over the fact that you can't use an index that way ;-)

Why are you bothering with these divisors? float4 is no larger than
int4 and will eliminate all of these pushups: just store the values
naturally.

If there really is some good reason to use scaled integers, you should
build yourself a scaled-integer datatype.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message guard 2001-02-26 04:09:11 not use pg_dump & pg_dumpall
Previous Message R D 2001-02-24 11:22:53 Indexes and Views