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 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

RE: Forced to use UNION ALL when having multiple ANY operators and ORDER BY LIMIT

2023-06-18 Thread msalais
Hi, Do you really need to do “select *”? In other words, is it necessary to have all columns in the result? Michel SALAIS De : benoit Envoyé : lundi 12 juin 2023 23:35 À : Chris Hoover Cc : pgsql-performance@lists.postgresql.org Objet : RE: Forced to use UNION ALL when having multiple

RE: Query unable to utilize index without typecast to fixed length character

2023-04-08 Thread msalais
Hi, Your error is the use of quotes around the constant numeric value! You should not use it because that means then that it is a character constant causing an implicit conversion. We must consider any implicit conversion in our queries as a potential problem and we must absolutely avoid u