Re: huge shared_blocks_hit one select but manually run very fast

2024-12-21 Thread James Pang
Yes, we have primary key and another index that include bigint and uuid that stored in database as varchar(64), many sessions inserting ... values and at the same time, many sessions running the select query. table size 13GB, primary is 6GB, the other index is 13GB too, the select query

Re: huge shared_blocks_hit one select but manually run very fast

2024-12-21 Thread David Mullineux
Depends on a lot of thongs...Visibility map sounds like it's impacted here. Are your inserts towards the index (like a monotonically increasing serial id) or scattered around the index values ? How big is the table index and shared buffers ? An example would really help On Sat, 21 Dec 2024,

huge shared_blocks_hit one select but manually run very fast

2024-12-21 Thread James Pang
Hi, we have a simple select from table where ... (that mache the index) , table has 80million rows. when many application sessions run the query and at the same time some other sessions doing insert into ... this table. from pg_stat_statements, shared_blks_hit show 31652 / per call. we s