Re: [PERFORM] PostgreSQL 9.0.1 on Windows performance tunning help please

2011-08-08 Thread Kevin Grittner
tuanhoanganh wrote: > I can not change the query because it is generate by SymmetricDS > program. So I only can create index on table and change config of > postgres to tunning the query. Is there any way to do that? I'm not familiar with SymetricDS. Would it be possible for you to create a V

Re: [PERFORM] PostgreSQL 9.0.1 on Windows performance tunning help please

2011-08-08 Thread tuanhoanganh
Thanks for your help. But I can not change the query because it is generate by SymmetricDS program. So I only can create index on table and change config of postgres to tunning the query. Is there any way to do that? Sorry for my English Tuan Hoang ANh On Sat, Aug 6, 2011 at 11:26 PM, Kevin Grit

Re: [PERFORM] PostgreSQL 9.0.1 on Windows performance tunning help please

2011-08-06 Thread Kevin Grittner
"Kevin Grittner" wrote: > WITH x AS SELECT * FROM x ORDER BY d.data_id; It ate part of what I had on that line. (Note to self: don't use angle-bracketing in posts.) Trying again with different punctuation: WITH x AS [original query] SELECT * FROM x ORDER BY d.data_id; -Kevin -- Sent

Re: [PERFORM] PostgreSQL 9.0.1 on Windows performance tunning help please

2011-08-06 Thread Kevin Grittner
[Please don't top-post; it makes the discussion hard to follow.] tuanhoanganh wrote: > Greg Williamson wrote: >> Did you run an analyze on the table after building the new >> indexes? The row estimates seem to be off wildly, although that >> may be a symptom of something else I think that'

Re: [PERFORM] PostgreSQL 9.0.1 on Windows performance tunning help please

2011-08-05 Thread tuanhoanganh
Yes, I run VACUUM VERBOSE ANALYZE sym_data; VACUUM VERBOSE ANALYZE sym_data_gap; after create index. If i remove ORDER BY, the query run faster. explain analyze select d.data_id, d.table_name, d.event_type, d.row_data, d.pk_data, d.old_data, d.create_time, d.trigger_hist_id, d.channel_id, d.trans

Re: [PERFORM] PostgreSQL 9.0.1 on Windows performance tunning help please

2011-08-05 Thread Greg Williamson
Tuan -- > > Thanks for your help. > I create index on channel_id and data_id like your comment.  ... <...> > > explain analyze select d.data_id, d.table_name, d.event_type, d.row_data, > d.pk_data, d.old_data, d.create_time, d.trigger_hist_id, d.channel_id, > d.transaction_id, > d.source_node_

Re: [PERFORM] PostgreSQL 9.0.1 on Windows performance tunning help please

2011-08-05 Thread tuanhoanganh
Thanks for your help. I create index on channel_id and data_id like your comment. - Index: idx_d_channel_id2 -- DROP INDEX idx_d_channel_id2; CREATE INDEX idx_d_channel_id2 ON sym_data USING btree (channel_id); -- Index: idx_d_channel_id3 -- DROP INDEX idx_d_channel_id3; CREATE INDEX id

Re: [PERFORM] PostgreSQL 9.0.1 on Windows performance tunning help please

2011-08-05 Thread Kevin Grittner
tuanhoanganh wrote: > I have postgresql 9.0.1 http://www.postgresql.org/support/versioning > 6GB ram > work_mem = 2097151 I think that has the potential to push you into swapping: cc=> set work_mem = 2097151; SET cc=> show work_mem; work_mem --- 2097151kB (1 row) That's 2GB

[PERFORM] PostgreSQL 9.0.1 on Windows performance tunning help please

2011-08-05 Thread tuanhoanganh
I have postgresql 9.0.1 on windows 2003 ent with 6GB ram, 4 disk SATA RAID 10. I am running SymmetricDS to replication over WAN. But yesterday there was a big problem, i updated alot of rows and query to gap data of SymmetricDS run verry very slowly. Here is my postgresql.conf to tunning PostgreSQ