Re: Index not used in certain nested views but not in others
| От | Markus Demleitner |
|---|---|
| Тема | Re: Index not used in certain nested views but not in others |
| Дата | |
| Msg-id | 20250513144811.enpwh6sm5klsbkoc@victor обсуждение исходный текст |
| Ответ на | Re: Index not used in certain nested views but not in others (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: Index not used in certain nested views but not in others
|
| Список | pgsql-general |
Dear Tom,
On Tue, May 13, 2025 at 10:12:46AM -0400, Tom Lane wrote:
> Markus Demleitner <msdemlei@ari.uni-heidelberg.de> writes:
> > SELECT
> > CAST(ssa_dstype AS text) AS dataproduct_type,
> > CAST(NULL AS text) AS dataproduct_subtype,
> > CAST(2 AS smallint) AS calib_level,
> > ...
>
> Oh, well, that's your problem. The source tables' column types
> need to match. Otherwise the UNIONs don't get flattened and you
> don't get indexscans.
Ahhhh... *source* tables. Sure, once I'm out of desperation stun, it
kind of is unsurprising that the casts won't help me when it's about
pulling up the original tables.
Just to be sure: int and bigint don't mix, and neither do real and
double precision, right? And the lazybone in me can't resist asking:
there's absolutely no way around this?
Thanks for setting my head straight,
Markus
В списке pgsql-general по дате отправления: