Re: Geometric types row estimation

2022-11-30 Thread Igor ALBUQUERQUE SILVA
Ok I'll do that, thanks a lot! On Wed, 30 Nov 2022 at 18:45, Tom Lane wrote: > Igor ALBUQUERQUE SILVA writes: > > Thanks a lot for the explanation, I thought the built-in types were more > > standard, so I didn't mention that I was having the same thing using > > postgis. > > Hm --- you'd have

Re: Geometric types row estimation

2022-11-30 Thread Tom Lane
Igor ALBUQUERQUE SILVA writes: > Thanks a lot for the explanation, I thought the built-in types were more > standard, so I didn't mention that I was having the same thing using > postgis. Hm --- you'd have to take that up with the PostGIS people. But they at least would be likely to have

Re: Geometric types row estimation

2022-11-30 Thread Igor ALBUQUERQUE SILVA
Hi Tom, Thanks a lot for the explanation, I thought the built-in types were more standard, so I didn't mention that I was having the same thing using postgis. Here's the example (I changed the values a little bit to avoid rounding errors): create table test(p geometry(point)); insert into

Re: Geometric types row estimation

2022-11-30 Thread Tom Lane
Igor ALBUQUERQUE SILVA writes: > I'm having a problem regarding the point type/gist indexes. Here's a > minimal reproduction of it: > ... > What I was expecting is the first query to estimate 4 rows and the second > to estimate 1, like what I get If I try the same thing using integers.

Re: Geometric types row estimation

2022-11-30 Thread Igor ALBUQUERQUE SILVA
I'm sorry, I sent the wrong EXPLAIN ANALYZE for the first query, this is the correct one: Seq Scan on test (cost=0.00..1.06 rows=1 width=16) (actual time=0.018..0.022 rows=4 loops=1) Filter: (p <@ '(1,1),(0,0)'::box) Rows Removed by Filter: 1 Planning Time: 0.211 ms Execution Time: 0.051

Geometric types row estimation

2022-11-30 Thread Igor ALBUQUERQUE SILVA
Hello everyone, I'm having a problem regarding the point type/gist indexes. Here's a minimal reproduction of it: create table test(p point); insert into test(p) values (point(0, 0)); insert into test(p) values (point(0, 1)); insert into test(p) values (point(1, 0)); insert into test(p) values

Re: Catching up with performance & PostgreSQL 15

2022-11-30 Thread Tom Lane
Andres Freund writes: > On November 30, 2022 3:47:32 AM PST, Andrew Dunstan > wrote: >> I think Alvaro's point is that it would have been better to work out >> these wrinkles before turning on JIT by default. Based on anecdotal >> reports from the field I'm inclined to agree. > The problem is

Re: Catching up with performance & PostgreSQL 15

2022-11-30 Thread Andres Freund
Hi, On November 30, 2022 3:47:32 AM PST, Andrew Dunstan wrote: > >On 2022-11-29 Tu 16:06, David Rowley wrote: >> On Wed, 30 Nov 2022 at 03:31, Tom Lane wrote: >>> Alvaro Herrera writes: IMO it was a mistake to turn JIT on in the default config, so that's one thing you'll likely want

Re: Catching up with performance & PostgreSQL 15

2022-11-30 Thread Andrew Dunstan
On 2022-11-29 Tu 16:06, David Rowley wrote: > On Wed, 30 Nov 2022 at 03:31, Tom Lane wrote: >> Alvaro Herrera writes: >>> IMO it was a mistake to turn JIT on in the default config, so that's one >>> thing you'll likely want to change. >> I wouldn't necessarily go quite that far, but I do think