PostgreSQL @ FOSDEM 2021 - Call for Papers

2020-12-14 Thread Andreas 'ads' Scherbaum
Call for Proposals We are happy to announce that FOSDEM is hosting a virtual PostgreSQL Devroom at FOSDEM 2021. Next year’s conference will take place on the 6th and 7th of February, with the PostgreSQL Devroom being on Saturday 6th. Information about FOSDEM is available at the official

Re: Improving performance of select query

2020-12-14 Thread Rob Sargent
> On Dec 14, 2020, at 10:37 AM, Muhammad Bilal Jamil > wrote: > > I think you can also increase the query performance by creating indexes? > > > OP said there was a key on the target (large) table. I’m not sure there’s much of a win in indexing 10K ids. > >

Re: Improving performance of select query

2020-12-14 Thread Adam Scott
select count(*) from is probably not using the index that your insert/select would, so I would not use that as a test for performance. If customer_backup has an index, the insert-select will be performance-limited by updating that index. If you can do a *create table customer_backup* as *select

Re: Improving performance of select query

2020-12-14 Thread Muhammad Bilal Jamil
I think you can also increase the query performance by creating indexes? On Mon, 14 Dec 2020 at 11:36, Rob Sargent wrote: > > > > On Dec 14, 2020, at 4:47 AM, Thomas Kellerer wrote: > > > > Karthik Shivashankar schrieb am 14.12.2020 um 12:38: > >> I have a postgres(v9.5) table named customer ho

Re: Improving performance of select query

2020-12-14 Thread Rob Sargent
> On Dec 14, 2020, at 4:47 AM, Thomas Kellerer wrote: > > Karthik Shivashankar schrieb am 14.12.2020 um 12:38: >> I have a postgres(v9.5) table named customer holding 1 billion rows. >> It is not partitioned but it has an index against the primary key >> (integer). I need to keep a very few re

Mitigating impact of long running read-only queries

2020-12-14 Thread Michael Lewis
https://www.postgresql.org/docs/current/sql-set-transaction.html "The DEFERRABLE transaction property has no effect unless the transaction is also SERIALIZABLE and READ ONLY. When all three of these properties are selected for a transaction, the transaction may block when first acquiring its snaps

Re: Dynamic procedure execution

2020-12-14 Thread Adrian Klaver
On 12/13/20 9:59 PM, Muthukumar.GK wrote: Hi team, When I am trying to implement belwo dynamic concept in postgreSql, getting some error. Kindly find the below attached program and error. Please advise me what is wrong here.. CREATE OR REPLACE PROCEDURE DynamicProc() AS $$ DECLARE v_query

Re: Dynamic procedure execution

2020-12-14 Thread David G. Johnston
On Monday, December 14, 2020, David G. Johnston wrote: > > On Sunday, December 13, 2020, Muthukumar.GK wrote: > >> Hi David, >> >> As I am not bit Clea, let me know what I have to do. If possible, please >> re- write my program. >> > > Like the SQL executor, I have no idea what you are trying to

Re: Dynamic procedure execution

2020-12-14 Thread David G. Johnston
On Sunday, December 13, 2020, Muthukumar.GK wrote: > Hi David, > > As I am not bit Clea, let me know what I have to do. If possible, please > re- write my program. > Like the SQL executor, I have no idea what you are trying to do there. Neither the text variable, nor the cursor, nor plpgsql for

Re: Improving performance of select query

2020-12-14 Thread Thomas Kellerer
Karthik Shivashankar schrieb am 14.12.2020 um 12:38: > I have a postgres(v9.5) table named customer holding 1 billion rows. > It is not partitioned but it has an index against the primary key > (integer). I need to keep a very few records (say, about 10k rows) > and remove everything else. > > /ins

Improving performance of select query

2020-12-14 Thread Karthik Shivashankar
Hi, I have a postgres(v9.5) table named customer holding 1 billion rows. It is not partitioned but it has an index against the primary key (integer). I need to keep a very few records (say, about 10k rows) and remove everything else. insert into customer_backup select * from customer where cust

Re: Dynamic procedure execution

2020-12-14 Thread Hemil Ruparel
Not to be disrespectful, but you need to at least struggle to find the answers yourself before posting here. On Mon, Dec 14, 2020 at 12:02 PM Muthukumar.GK wrote: > Hi David, > > As I am not bit Clea, let me know what I have to do. If possible, please > re- write my program. > > Regards > Muthu