Re: Reg. Postgres Unique contraint

2024-11-26 Thread Vitalii Tymchyshyn
We saw it when OS image changed resulting in collation library change, so index lookups started to fail and reindex was needed to fix it. ср, 27 лист. 2024 р. о 16:23 Burcin Yazici пише: > hi, > > make sure that the values are really duplicated first.. > > - check the collation of column. > - c

Re: checking for a NULL date in a partitioned table kills performance (accidentally sent to the admin list before)

2024-08-22 Thread Vitalii Tymchyshyn
Can you put the whole thing into the index where clause? (contract_date IS NULL) OR (contract_date > '2022-01-01'::date) Best regards, Vitalii Tymchyshyn чт, 22 серп. 2024 р. о 14:48 Sbob пише: > All; > > I am running a select from a partitioned tab

Re: Low performance between datacenters

2024-07-07 Thread Vitalii Tymchyshyn
Often it happens because of the low batch size for fetching data. This makes client wait unnecessarily while reading rows. I am not sure which client are you using, but in java this can be controlled on per-statement level, see https://jdbc.postgresql.org/documentation/query/ I believe there is al

Re: Optimizing count(), but Explain estimates wildly off

2024-02-26 Thread Vitalii Tymchyshyn
Is your transaction id more or less monotonic according to the date? If so, something like the next can help: with tenders_filtered as (select * from tenders where country = 'Mexico' and "date" >= '2023-01-01' and "date" < '2024-01-01') Select * from tenders_filtered inner join items on transactio

Re: reindex option for tuning load large data

2022-06-17 Thread Vitalii Tymchyshyn
I believe you should be able to use reindexdb with parallel jobs: https://www.postgresql.org/docs/13/app-reindexdb.html It will still create multiple connections, but you won't need to run multiple commands. чт, 16 черв. 2022 р. о 22:34 James Pang (chaolpan) пише: > Hi , > > We plan to migrate

Re: Using regexp from table has unpredictable poor performance

2021-08-25 Thread Vitalii Tymchyshyn
Btw: if you still run out of cache later with more regexes may be it makes sense to do prefiltering first my making a single gigantic regexp as string_agg(‘(‘||name_matches||’)’,’|’) and then only filter ones that match later. If postgresql provides capturing groups you may even be able to explode

Re: UUID v1 optimizations...

2019-05-25 Thread Vitalii Tymchyshyn
I am not sure why do you want to change on-disk storage format? If we are talking about indexes, it's more about comparison function (opclass) that is used in an index. Am I wrong? сб, 25 трав. 2019 о 11:21 Ancoron Luciferis < ancoron.lucife...@googlemail.com> пише: > On 25/05/2019 16:57, Tom Lan