From: Holger Jakobs <holger@jakobs.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: how to make duplicate finding query faster?
Date: Wed, 30 Dec 2020 12:18:06 +0100
Message-ID: <cd50c237-2062-a18b-374d-b2399830b988@jakobs.com> (raw)
In-Reply-To: <CALg-PKAwst1C2fF9ZBY+Dog0D2CZ7P-xppG41b3DnV62R=SxwQ@mail.gmail.com>
References: <CALg-PKBPQPBMbNAxf-pF0OLbYs0exC7Vf2Sn3hNPUAJ7Q=mPtA@mail.gmail.com>
<5bf642e4-eb22-8eba-e96d-5b33b5010b03@jakobs.com>
<CALg-PKAwst1C2fF9ZBY+Dog0D2CZ7P-xppG41b3DnV62R=SxwQ@mail.gmail.com>
Am 30.12.20 um 09:59 schrieb Sachin Kumar:
> HI Mr. Holger,
>
> This will not suffice our requirement. we have to validate that there
> would not be any duplicate value in DB. we have done that earlier by
> leaving DB to check if there is any duplicate and found duplicate
> value in DB.
>
> we have a table "card" and a single column "number " which we are
> updated with a csv file with 600k numbers and require no duplicate
> number should be there in the table.
>
> Please if can have a faster query can help us in achieving this
> requirement.
>
>
Quote: leaving DB to check if there is any duplicate and found duplicate
value in DB
No, that's not possible with PostgreSQL. If you have a Primary Key or a
Unique Constraint, no duplicates will be allowed by the DB.
There must be a different reason.
--
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012
Attachments:
OpenPGP_signature (application/pgp-signature, 202B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: holger@jakobs.com, pgsql-admin@lists.postgresql.org
Subject: Re: how to make duplicate finding query faster?
In-Reply-To: <cd50c237-2062-a18b-374d-b2399830b988@jakobs.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox