[SQL] PostgreSQL Active-Active Configuration

2010-03-04 Thread Dave Clements
Hi everyone, I am looking for some Master-Master replication solutions for PostgreSQL database. Please let me know if you are using one and if you are happy with the performance. Thanks -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://

Re: [SQL] Fwd: Help required on query performance

2010-01-31 Thread Dave Clements
nload%'; This query does a sequence scan on the table. Is there a way I can create an index for this? thanks On Mon, Feb 1, 2010 at 2:32 PM, Tom Lane wrote: > Dave Clements writes: >> Hello, I have this query in my system which takes around 2.5 seconds >> to run. I have diag

Re: [SQL] Fwd: Help required on query performance

2010-01-31 Thread Dave Clements
After doing an analyze on the database, it improved a lot :) On Mon, Feb 1, 2010 at 12:13 PM, Scott Marlowe wrote: > On Sun, Jan 31, 2010 at 6:09 PM, Dave Clements wrote: >> I did the re-analyze serveral times, using the command: >> >> ANALYZE tablename; >> >&

Re: [SQL] Fwd: Help required on query performance

2010-01-31 Thread Dave Clements
I did the re-analyze serveral times, using the command: ANALYZE tablename; Is there any other command as well or another way to do that? On Mon, Feb 1, 2010 at 12:04 PM, Scott Marlowe wrote: > On Sun, Jan 31, 2010 at 6:02 PM, Dave Clements wrote: >> Hi, following the output fro

Re: [SQL] Fwd: Help required on query performance

2010-01-31 Thread Dave Clements
-> Bitmap Index Scan on sq_ast_lnk_tree_linkid (cost=0.00..4.33 rows=381 width=0) (actual time=0.005..0.005 rows=1 loops=975) Index Cond: (t.linkid = "outer".linkid) -> Bitmap Index Scan on sq_ast_lnk_tree_pkey (cost=0.

[SQL] Fwd: Help required on query performance

2010-01-31 Thread Dave Clements
Hello, I have this query in my system which takes around 2.5 seconds to run. I have diagnosed that the problem is actually a hashjoin on perm and s_ast_role tables. Is there a way I can avoid that join? I just want to change the query and no environment change. SELECT  ai.aid,  SUM(ai.score) as se