Re: SHARED LOCKS , EXCLUSIVE LOCKS, ACCESS EXCLUSIVE LOCKS

2021-04-04 Thread Justin Pryzby
On Sun, Apr 04, 2021 at 04:12:14PM +0530, aditya desai wrote: > Hi, > We have few select queries during which we see SHARED LOCKS and EXCLUSIVE > LOCKS on tables. Can these locks cause slowness? Is there any way to reduce > the locks? > > What must be causing ACCESS EXCLUSIVE LOCKS when the applic

Re: SHARED LOCKS , EXCLUSIVE LOCKS, ACCESS EXCLUSIVE LOCKS

2021-04-04 Thread Amine Tengilimoglu
Hi; It's normal to see locks on tables during queries. These are usually locks used automatically by postgres as a result of the operations you perform on your database. You should check the document for the lock modes postgres uses. Lock causes slowness if it causes other queries to wait. You ca

Re: SELECT Query taking 200 ms on PostgreSQL compared to 4 ms on Oracle after migration.

2021-04-04 Thread aditya desai
Noted thanks!! On Sun, Apr 4, 2021 at 4:19 PM Pavel Stehule wrote: > > > ne 4. 4. 2021 v 12:39 odesílatel aditya desai napsal: > >> Hi Pavel, >> Notes thanks. We have 64 core cpu and 320 GB RAM. >> > > ok - this is probably good for max thousand connections, maybe less (about > 6 hundred). Post

SHARED LOCKS , EXCLUSIVE LOCKS, ACCESS EXCLUSIVE LOCKS

2021-04-04 Thread aditya desai
Hi, We have few select queries during which we see SHARED LOCKS and EXCLUSIVE LOCKS on tables. Can these locks cause slowness? Is there any way to reduce the locks? What must be causing ACCESS EXCLUSIVE LOCKS when the application is running select queries? Is it AUTOVACUUM? Regards, Aditya.