Re: Failing streaming replication on PostgreSQL 14

2024-04-22 Thread Nicolas Seinlet
lp me locate the issue's origin? thanks, Nicolas. On Tuesday, April 16th, 2024 at 09:56, Nicolas Seinlet wrote: > > > Hello, > > > What exactly is "cyphered ZFS"? Can you reproduce the problem with some > > other filesystem? If it's somethin

Re: Failing streaming replication on PostgreSQL 14

2024-04-16 Thread Nicolas Seinlet
Hello, > What exactly is "cyphered ZFS"? Can you reproduce the problem with some > other filesystem? If it's something very unusual, it might well be a > bug in the filesystem. The filesystem is openzfs with native aes-256-gcm encryption: https://openzfs.github.io/openzfs-docs/man/master/7/zfspro

Re: Failing streaming replication on PostgreSQL 14

2024-04-15 Thread Nicolas Seinlet
On Monday, April 15th, 2024 at 14:36, Ron Johnson wrote: > On Mon, Apr 15, 2024 at 2:53 AM Nicolas Seinlet wrote: > > > Hello everyone, > > > > Since I moved some clusters from PostgreSQL 12 to 14, I noticed random > > failures in streaming replication. I

Failing streaming replication on PostgreSQL 14

2024-04-14 Thread Nicolas Seinlet
Hello everyone, Since I moved some clusters from PostgreSQL 12 to 14, I noticed random failures in streaming replication. I say "random" mostly because I haven't got the source of the issue. I'm using the Ubuntu/cyphered ZFS/PostgreSQL combination. I'm using Ubuntu LTS (20.04 22.04) and provid

Re: plan using BTree VS GIN

2023-06-25 Thread Nicolas Seinlet
On Friday, June 23rd, 2023 at 2:52 PM, Laurenz Albe wrote: > > > On Fri, 2023-06-23 at 12:08 +, Nicolas Seinlet wrote: > > > we faced an issue with a select query on a relatively large table on our > > database. > > The query involves one single tab

plan using BTree VS GIN

2023-06-23 Thread Nicolas Seinlet
Hello, we faced an issue with a select query on a relatively large table on our database. The query involves one single table. The table has more than 10 million records. It's mainly composed of varchar fields, have a primary key (id) of type serial, and when records of this table are shown to u

Re: More records after sort

2021-07-21 Thread Nicolas Seinlet
Thanks all, I'll try this on Monday when I go back to the office. Nicolas. ‐‐‐ Original Message ‐‐‐ On Wednesday, July 21st, 2021 at 02:55, Rob Sargent wrote: > > Query: > > > > INSERT INTO invl_aml_mapping_temp(invl_id, aml_id, cond) > > > >    SELECT il.id, ml.id, 48 >

Re: More records after sort

2021-07-20 Thread Nicolas Seinlet
On Tuesday, July 20th, 2021 at 16:34, Tom Lane wrote: > Nicolas Seinlet nico...@seinlet.com writes: > > > I'm facing a strange behaviour and I don't understand why. From a wider > > query plan, https://explain.dalibo.com/plan/7yh ,a table is scanned and > &g

More records after sort

2021-07-20 Thread Nicolas Seinlet
Hello, I'm facing a strange behaviour and I don't understand why. From a wider query plan, https://explain.dalibo.com/plan/7yh ,a table is scanned and filter based on its primary key, returning 98 records. Then, those records are sorted on another field, and the output is 758,247,643 records.

Re: second CTE kills perf

2021-06-24 Thread Nicolas Seinlet
Hi, thanks for all. I replaced row_number() with some computed int which speeds up a lot the query. ‐‐‐ Original Message ‐‐‐ On Tuesday, June 22nd, 2021 at 15:53, Tom Lane wrote: > Nicolas Seinlet nico...@seinlet.com writes: > > > I'm trying to understand this

second CTE kills perf

2021-06-22 Thread Nicolas Seinlet
AS (SELECT row_number() over(),x,y,z FROM cte1) SELECT * FROM cte2 WHERE x=32; The real examples, with query plans: https://explain.dalibo.com/plan/98A https://explain.dalibo.com/plan/o6X4 Thanks for your time, Nicolas Seinlet. publickey - nicolas@seinlet.com - 0xCAEB7FAF.asc Description: applicatio

Re: Sort is generating rows

2018-06-10 Thread Nicolas Seinlet
Hi, a currency rate can have no company, and is then applicable to currencies which have no rate specific for the company. Le dim. 10 juin 2018 à 17:24, Adrian Klaver a écrit : > On 06/05/2018 07:58 AM, Nicolas Seinlet wrote: > > Hi, > > > > I've tried some tests, b

Re: Sort is generating rows

2018-06-05 Thread Nicolas Seinlet
Hi, I've tried some tests, by generating various datas in the res_currency_rate table. If I generate res_currency_rate rows for unsused currencies, this doesn't influence the execution time. if I generate more res_currency_rate for used currencies, this slower the query. If I generate 100 rates,

Re: Sort is generating rows

2018-06-05 Thread Nicolas Seinlet
l.order_id, t.uom_id, t.categ_id, s.name, s.date_order, s.confirmation_date, s.partner_id, s.user_id, s.state, s.company_id, s.pricelist_id, s.analytic_account_id, s.team_id, p.product_tmpl_id, partner.country_id, partner.commercial_partner_id; And thanks again for the help. Have a nice day,

Re: Sort is generating rows

2018-06-01 Thread Nicolas Seinlet
D (daterange(name, COALESCE(date_end, (now())::date)) @> (COALESCE((s.date_order)::timestamp with time zone, now()))::date)) Rows Removed by Filter: 502 Planning time: 5.731 ms Execution time: 8944.950 ms (45 rows) Have a nice day, Nicolas. 2018-

Sort is generating rows

2018-05-31 Thread Nicolas Seinlet
Hi, I have a query with a strange query plan. This query is roughly searching for sales, and convert them with a currency rate. As currency rate changes from time to time, table contains the currency, the company, the rate, the start date of availability of this rate and the end date of availabil