Re: bulk DMLs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 16, 2023 at 8:21 AM Ron Johnson <ronljohnsonjr@xxxxxxxxx> wrote:
>
> On Thu, Nov 16, 2023 at 7:04 AM Nikhil Ingale <niks.bgm@xxxxxxxxx> wrote:
>>
>> Hi All,
>> Hope everyone is doing well.
>> I would like to know how we perform/handle the bulk provisioning i.e., insert/delete/updates in Postgresql.
>>
>
> Bulk loading via the COPY command is very efficient.
> Bulk deletes can be tricky.  I'd use a CTE SELECT with LIMIT clause that fetches the PK in chunks.

TRUNCATE command is fast alternative to DELETE when you're sure you
want to delete all rows of a table. Please read the full docs of the
TRUNCATE command to make sure you understand the tradeoff, though.

https://www.postgresql.org/docs/current/sql-truncate.html

Best regards,
Gurjeet
http://Gurje.et






[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux