Re: Obvious data mismatch in View2 which basically SELECT * from View1
В списке pgsql-general по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Obvious data mismatch in View2 which basically SELECT * from View1 |
| Дата | |
| Msg-id | 236993.1600369187@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Obvious data mismatch in View2 which basically SELECT * from View1 (Ben <bentenzha@outlook.com>) |
| Список | pgsql-general |
Ben <bentenzha@outlook.com> <MWHPR06MB2400E1FA4AAD12440EA96B79B93E0@MWHPR06MB2400.namprd06.prod.outlook.com> writes:
> You are right none of them is what I originally used to create them
> which should be
> `select * from utlog.stats_per_shift_filtered_b0206`, but they do look
> different,
This discrepancy could explain a lot:
> (stats_per_shift_filtered_u0206.wsft)::character varying AS wsft,
vs
> stats_per_shift_filtered_b0206.wsft,
Your problem query has a WHERE clause testing wsft, so this difference
is subtly affecting what that WHERE clause means. That could result in
a plan change, thereby changing the row output order, which as already
noted would be sufficient to explain the inconsistency.
If I had to bet I'd suspect that the extra cast is blocking use of an
index on wsft.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера