| From: | "Michael Paesold" <mpaesold(at)gmx(dot)at> |
|---|---|
| To: | <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Indexes and differing column types |
| Date: | 2002-09-14 22:25:56 |
| Message-ID: | 0a3c01c25c3d$b2aae5a0$4201a8c0@beeblebrox |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi all,
this is my first mail to pgsql-hackers, so first I want to thank you all for
your great work. PostgreSQL is an amazing database management system and
wonderful to use.
Concerning this TODO entry:
> Allow SELECT * FROM tab WHERE int2col = 4 to use int2col index,
> int8, float4, numeric/decimal too [optimizer]
What about the case of doing a join on columns that don't have the same
type? Sometimes the index will be used, e.g. on this simple query:
SELECT * FROM a, b WHERE a.int4col = b.int8col;
Here the index will be used. But there are other queries where it's
necessary to do explicit type casting. I could provide examples.
Is this a known problem?
Best Regards,
Michael Paesold
| From | Date | Subject | |
|---|---|---|---|
| Next Message | D'Arcy J.M. Cain | 2002-09-14 22:39:49 | Reading a live database |
| Previous Message | Tom Lane | 2002-09-14 20:44:18 | Re: Multicolumn foreign keys need useless unique indices? |