Re: [GENERAL] better architecture?

2014-11-23 Thread zach cruise
On 11/22/14, Adrian Klaver adrian.kla...@aklaver.com wrote: On 11/21/2014 07:38 PM, zach cruise wrote: On 11/20/14, Adrian Klaver adrian.kla...@aklaver.com wrote: On 11/20/2014 04:57 PM, zach cruise wrote: On 11/20/14, Adrian Klaver adrian.kla...@aklaver.com wrote: On 11/20/2014 12:30 PM,

[GENERAL] Avoiding deadlocks when performing bulk update and delete operations

2014-11-23 Thread Sanjaya Vithanagama
Hi All, We have a single table which does not have any foreign key references. id_A (bigint) id_B (bigint) val_1 (varchar) val_2 (varchar) The primary key of the table is a composite of id_A and id_B. Reads and writes of this table are highly concurrent and the table has millions of rows. We

Re: [GENERAL] Avoiding deadlocks when performing bulk update and delete operations

2014-11-23 Thread Gavin Flower
On 24/11/14 16:51, Sanjaya Vithanagama wrote: Hi All, We have a single table which does not have any foreign key references. id_A (bigint) id_B (bigint) val_1 (varchar) val_2 (varchar) The primary key of the table is a composite of id_A and id_B. Reads and writes of this table are highly

[GENERAL] How to avoid a GIN recheck condition

2014-11-23 Thread Alexis
Hi, I have a GIN index but the planner rechecks the condition. When many rows are foud in the index that is very slow: EXPLAIN SELECT tracks.* FROM tracks WHERE (to_tsvector('simple', normalized_artist || ' ' || normalized_title) @@ to_tsquery('love'));