Re: Obvious data mismatch in View2 which basically SELECT * from View1

2020-09-17 Thread Tom Lane
Ben 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

Re: Obvious data mismatch in View2 which basically SELECT * from View1

2020-09-17 Thread Ben
Hi Sievers,  Krishna 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, maybe the prev version is created before a pg update ? b0206 could be 20190206 or 20180206... the output

Re: Obvious data mismatch in View2 which basically SELECT * from View1

2020-09-17 Thread Jerry Sievers
Ben writes: > Dear List, > > Some further investigation. > > Creating a fresh View3 on View1 gives exactly the same result as > View1. > > The View1 View2 are both years old in a production database, in use > for quite some time. (The database is production duty but not hosted > in server room wi

Re: Obvious data mismatch in View2 which basically SELECT * from View1

2020-09-17 Thread Ravi Krishna
>I haven't replaced the broken View2 yet. >Hope someone can point me to some >>further investigation. Did you look at the actual definition of view2. Like all RDBMS PG materializes the Ddl as it existed at the time of creation and converts it into an in line sql. There is a possibility it ma

Re: Obvious data mismatch in View2 which basically SELECT * from View1

2020-09-17 Thread Ben
Dear List, Some further investigation. Creating a fresh View3 on View1 gives exactly the same result as View1. The View1 View2 are both years old in a production database, in use for quite some time. (The database is production duty but not hosted in server room with UPS. It's like a edge PC i

Re: Obvious data mismatch in View2 which basically SELECT * from View1

2020-09-16 Thread Ben
Hi Magnus, Thanks for the heads up. For the data posted in this email, the listed result is the full result set for that query. I have checked the data in view2 and view1 with various conditions. Both view has many difference in column wspan::float8. The condition in the shown query is intende

Re: Obvious data mismatch in View2 which basically SELECT * from View1

2020-09-16 Thread Magnus Hagander
On Wed, Sep 16, 2020 at 9:26 AM Ben wrote: > Dear list, > > Recently I am getting feedback, data in my analytic report is not > repeatable. From time to time they get different data for the same time > span. > (but IIRC previously it was OK). Therefore I started debuging the View > chain for that

Re: Obvious data mismatch in View2 which basically SELECT * from View1

2020-09-16 Thread Ron
On 9/15/20 10:40 PM, Ben wrote: Dear list, Recently I am getting feedback, data in my analytic report is not repeatable. From time to time they get different data for the same time span. (but IIRC previously it was OK). Therefore I started debuging the View chain for that report, during which