RE: PgSQL 12 on WinSrv ~3x faster than on Linux

2021-06-04 Thread Taras Savchuk
> The first thing that comes to mind for me is fsync working correctly (i.e. > actually waiting for the disk write) in Linux but not in Windows. > On a weird VM stack like you've got, it's not hard for that sort of thing to > go > wrong. Needless to say, if that's the issue then the apparent perf

Re: PgSQL 12 on WinSrv ~3x faster than on Linux

2021-06-04 Thread Tom Lane
David Rowley writes: > On Fri, 4 Jun 2021 at 23:53, Taras Savchuk wrote: >> Any ideas what's wrong? For me such a big difference on identical >> databases/queries looks strange. > It's pretty difficult to say. You've not provided any useful details > about the workload you're running. > If this

Re: PgSQL 12 on WinSrv ~3x faster than on Linux

2021-06-04 Thread Vijaykumar Jain
also if you can setup an external timer \timing , along with explain analyse to get total time, it would help if everything else is same. I have seen some threads thar mention added startup cost for parallel workers on windows but not on Linux. But I do not want to mix those threads here, but jus

Re: PgSQL 12 on WinSrv ~3x faster than on Linux

2021-06-04 Thread David Rowley
On Fri, 4 Jun 2021 at 23:53, Taras Savchuk wrote: > My real life test is to "register" 10 _same_ documents (провести документы) > in each of 1C/PostgreSQL DBs. Both PostgreSQL DBs are identical and just > before test imported to PostgreSQL via application server (DT import). > On Windows Server

PgSQL 12 on WinSrv ~3x faster than on Linux

2021-06-04 Thread Taras Savchuk
Dear All, I have demo stand on Hyper-V (2xIntel E5-2650v2, 256GB RAM, Intel SSDs in RAID): * One VM with 1C application Server * 2 database VMs with same database imported into each PostgreSQL (~56Gb, "1C accounting 3.0" config): 1. CentOS 7 with postgresql_12.6_6.1C_x86_64 (distribution with spe

Re: slow query with inline function on AWS RDS with RDS 24x large

2021-06-04 Thread Ayub Khan
You are right, I dropped BRIN and created btree and the performance on 0 rows matching criteria table is good, below is the plan with BTREE. I will test by inserting lot of data. Hash Join (cost=50186.91..3765911.10 rows=5397411 width=291) (actual time=1.501..1.504 rows=0 loops=1) Hash Cond: (

Re: slow query with inline function on AWS RDS with RDS 24x large

2021-06-04 Thread Pavel Stehule
Hi pá 4. 6. 2021 v 10:32 odesílatel Ayub Khan napsal: > BRIN index is only on the date_time column, I even tried with btree index > with no performance gains. > -> Bitmap Heap Scan on restaurant_order ro (cost=5427.94..3353966.60 rows=19275986 width=108) (actual time=1036.793..1

Re: slow query with inline function on AWS RDS with RDS 24x large

2021-06-04 Thread Ayub Khan
BRIN index is only on the date_time column, I even tried with btree index with no performance gains. On Fri, Jun 4, 2021 at 11:23 AM Pavel Stehule wrote: > > > pá 4. 6. 2021 v 10:07 odesílatel Ayub Khan napsal: > >> >> below query is slow even with no data >> >> >> explain ANALYZE >> >> WITH bu

Re: slow query with inline function on AWS RDS with RDS 24x large

2021-06-04 Thread Pavel Stehule
pá 4. 6. 2021 v 10:07 odesílatel Ayub Khan napsal: > > below query is slow even with no data > > > explain ANALYZE > > WITH business AS( SELECT * FROM get_businessday_utc_f() start_date) > SELECT ro.order_id, > ro.date_time, > round(ro.order_amount, 2) AS order_amount, > b.branch_id

slow query with inline function on AWS RDS with RDS 24x large

2021-06-04 Thread Ayub Khan
below query is slow even with no data explain ANALYZE WITH business AS( SELECT * FROM get_businessday_utc_f() start_date) SELECT ro.order_id, ro.date_time, round(ro.order_amount, 2) AS order_amount, b.branch_id, b.branch_name, st_x(b.location) AS from_x, st_y(b.location