Actually there are lots of things that can be done with this sort of theorem
proving.
And NULL is a plenty good answer for a filter, just not for a check constraint.
Amongst them INSERT through UNION ALL for symmetric views which can be handy
for FDW partitioned tables.
One such implementation
On Mon, Dec 5, 2016 at 7:02 PM, Corey Huinker
wrote:
>
>> Would it be worth replacing the condition with the equivalent?
>> I mean would that help optimizing better some queries when it knows that
>> a is (not) nullable or when "a" is more complicated expression?
>>
>> a
>
>
> Would it be worth replacing the condition with the equivalent?
> I mean would that help optimizing better some queries when it knows that a
> is (not) nullable or when "a" is more complicated expression?
>
> a <> a: (a IS NULL) AND NULL
> a = a : (a IS NOT NULL) OR NULL
>
I
On Mon, Dec 5, 2016 at 3:24 PM, Tom Lane wrote:
> Pavel Stehule writes:
> > I found some crazy queries in one customer application. These queries are
> > stupid, but it was surprise for me so there are not some simple
> optimization
>
> > create
2016-12-05 16:41 GMT+01:00 Stephen Frost :
> Pavel,
>
> * Pavel Stehule (pavel.steh...@gmail.com) wrote:
> > 2016-12-05 16:23 GMT+01:00 Stephen Frost :
> > > * Pavel Stehule (pavel.steh...@gmail.com) wrote:
> > > > I found some crazy queries in one customer
Pavel,
* Pavel Stehule (pavel.steh...@gmail.com) wrote:
> 2016-12-05 16:23 GMT+01:00 Stephen Frost :
> > * Pavel Stehule (pavel.steh...@gmail.com) wrote:
> > > I found some crazy queries in one customer application. These queries are
> > > stupid, but it was surprise for me so
2016-12-05 16:23 GMT+01:00 Stephen Frost :
> Pavel,
>
> * Pavel Stehule (pavel.steh...@gmail.com) wrote:
> > I found some crazy queries in one customer application. These queries are
> > stupid, but it was surprise for me so there are not some simple
> optimization
> >
> >
2016-12-05 16:24 GMT+01:00 Tom Lane :
> Pavel Stehule writes:
> > I found some crazy queries in one customer application. These queries are
> > stupid, but it was surprise for me so there are not some simple
> optimization
>
> > create table foo(a
Pavel,
* Pavel Stehule (pavel.steh...@gmail.com) wrote:
> I found some crazy queries in one customer application. These queries are
> stupid, but it was surprise for me so there are not some simple optimization
>
> create table foo(a int);
> insert into foo select generate_series(1,10);
>
Pavel Stehule writes:
> I found some crazy queries in one customer application. These queries are
> stupid, but it was surprise for me so there are not some simple optimization
> create table foo(a int);
> insert into foo select generate_series(1,10);
> analyze foo;
Hi
I found some crazy queries in one customer application. These queries are
stupid, but it was surprise for me so there are not some simple optimization
create table foo(a int);
insert into foo select generate_series(1,10);
analyze foo;
explain select * from foo where a <> a;
It does full
11 matches
Mail list logo