Re: Reg. Postgres Unique contraint

2024-12-27 Thread shammat
Am 27.11.24 um 05:14 schrieb Sajjad Abid: A column is character varying(50), also on this column a unique constraint is defined, but I found some duplicate values in this column for some records user_name character varying(50) CONSTRAINT user_name_unq UNIQUE ( user_name ) Most likely a locale

RE: Reg. Postgres Unique contraint

2024-12-27 Thread msalais
Hi, Does the following query return something: Select user_name, count(*) from your_table group by user_name having count(*) > 1 Best regards Michel SALAIS De : Sajjad Abid Envoyé : mercredi 27 novembre 2024 05:28 À : Diomedes Dominguez Cc : pgsql-performance@lists.postgresq

Re: CTE Inline On TPC-DS Query 95

2024-12-27 Thread David Rowley
On Sat, 28 Dec 2024 at 00:34, wrote: > Sometimes one is better and sometimes the other is best. > In Oracle, the choice is done by COST. This should be the same for > PostgreSQL. In essence, it is the same thing for views: inlining or > materializing... I don't doubt you. However, I did already

RE: CTE Inline On TPC-DS Query 95

2024-12-27 Thread msalais
Hi, The choice between inlining and materializing is not a question of syntax. It matters if the parent query references the CTE expression more than once but this is not a decisive factor... Sometimes one is better and sometimes the other is best. In Oracle, the choice is done by COST. This sh