Re: Insert query performance

2024-08-20 Thread David Rowley
On Tue, 20 Aug 2024 at 19:09, sud wrote: > However, my initial understanding of "having the FK index will improve the > insert performance in the child table" is not accurate it seems. Rather as > you mentioned it may negatively impact the loading/insert performance because > it has to now upda

Re: Insert query performance

2024-08-20 Thread Muhammad Ikram
It will record all statements in logs. If you are concerned about query times then you may use pg_stat_statements. Muhammad Ikram On Tue, 20 Aug 2024 at 12:19, sud wrote: > > On Mon, Aug 19, 2024 at 1:25 PM Muhammad Ikram wrote: > >> Hi Sud, >> >> Please make following change in your postgr

Re: Insert query performance

2024-08-20 Thread sud
On Mon, Aug 19, 2024 at 1:25 PM Muhammad Ikram wrote: > Hi Sud, > > Please make following change in your postgresql.conf file > > log_statement = 'all' > > Will this put all the internal sql query or the recursive query entries in the pg_stats_statement view which we can analyze then? And also to

Re: Insert query performance

2024-08-20 Thread sud
On Mon, Aug 19, 2024 at 4:33 PM David Rowley wrote: > On Mon, 19 Aug 2024 at 19:48, sud wrote: > > In a version 15.4 postgres database, Is it possible that , if we have > two big range partition tables with foreign key relationships between them, > insert into the child table can cause slowness

Re: Insert query performance

2024-08-19 Thread David Rowley
On Mon, 19 Aug 2024 at 19:48, sud wrote: > In a version 15.4 postgres database, Is it possible that , if we have two big > range partition tables with foreign key relationships between them, insert > into the child table can cause slowness if we don't have foreign key index > present in the chi

Re: Insert query performance

2024-08-19 Thread Muhammad Ikram
Hi Sud, Please make following change in your postgresql.conf file log_statement = 'all' Regards, Ikram On Mon, Aug 19, 2024 at 12:48 PM sud wrote: > Hello All, > > In a version 15.4 postgres database, Is it possible that , if we have two > big range partition tables with foreign key relatio

Insert query performance

2024-08-19 Thread sud
Hello All, In a version 15.4 postgres database, Is it possible that , if we have two big range partition tables with foreign key relationships between them, insert into the child table can cause slowness if we don't have foreign key index present in the child table? Basically it need to make sure