[PERFORM] on disk and in memory

2013-06-24 Thread Jayadevan M
the data will be in memory. This is mostly master data (transactions will go to Casandra), and will be read from, rarely written to. We do need data integrity, transaction management, failover etc - hence PostgreSQL. Regards, Jayadevan DISCLAIMER: "The information in this e-mail an

Re: [PERFORM] Execution from java - slow

2012-09-03 Thread Jayadevan M
as not necessary) from the SELECT solved the problem. But why the behavior was different when executed from psql and java is still a mystery. Thanks a lot for the suggestions. Regards, Jayadevan DISCLAIMER: "The information in this e-mail and any attachment is intended only f

[PERFORM] Execution from java - slow

2012-08-27 Thread Jayadevan M
te It did not help. Any suggestions? It is from_date and to_date on which data gets filtered. We are using the same values for filtering, when we execute it from java/psql Regards, Jayadevan DISCLAIMER: "The information in this e-mail and any attachment is intended only for the pe

Re: [PERFORM] Query performance issue

2011-09-05 Thread Jayadevan
Based on my initial hunch that something resulting from all the ALTERS was making PostgreSQL planner end up with bad plans, I tried a pg_dump and pg_restore. Now the 'bad' query comes back in 70 seconds (compared to 20 minutes earlier) and the rewritten query still comes back in 2 seconds. So we wi

Re: [PERFORM] Query performance issue

2011-09-04 Thread Jayadevan M
' AND UPPER(INDINF.FAMNAM) LIKE 'PRICE' || '%' ORDER BY UPPER(INDINF.GVNNAM), UPPER(INDINF.FAMNAM), UPPER(INDINF.CMPNAM) Regards, Jayadevan DISCLAIMER: "The information in this e-mail and any attachment is intended only for the person to whom it is addre

Re: [PERFORM] Query performance issue

2011-09-04 Thread Jayadevan
I don't think I understood all that. Anyway, is there a way to fix this - either by rewriting the query or by creating an index? The output does match what I am expecting. It does take more than 10 times the time taken by Oracle for the same result, with PostgreSQL taking more than 20 minutes. I a

Re: [PERFORM] Query performance issue

2011-09-02 Thread Jayadevan
Here goesI think it might be difficult to go through all these definitions.. PRGMEMACCMST Table "public.prgmemaccmst" Column|Type | Modifiers --+-+--- cmpcod | character varying(5)

Re: [PERFORM] Query performance issue

2011-08-31 Thread Jayadevan M
sted Loop (cost=0.01..1887.62 rows=215 width=61) (actual > time=0.088..23.445 rows=1121 loops=1) > > How can a sort ge 1121 rows at the input and return 2673340321 rows at the > output? Not sure where this comes from. > > BTW what PostgreSQL version is this? PostgreSQL 9.

Re: [PERFORM] Query performance issue

2011-08-31 Thread Jayadevan M
MY1 Going through the url tells me that statistics may be off. I will try analyzing the tables. That should help? Regards, Jayadevan DISCLAIMER: "The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or p

Re: [PERFORM] Query performance issue

2011-08-31 Thread Jayadevan M
Hello, > > Please run EXPLAIN ANALYZE on the query and post that, it's hard to say > what's wrong from just the query plan, without knowing where the time is > actually spent. Here is the explain analyze http://explain.depesz.com/s/MY1 Regards, Jayadevan DISCLAIMER:

Re: [PERFORM] Query performance issue

2011-08-31 Thread Jayadevan M
s were of similar type - ALTER TABLE cusdynatr ALTER tstflg TYPE boolean USING CASE WHEN tstflg = '1' THEN true WHEN tstflg = '0' then FALSE END; Do such alters result in fragmentation at storage level? Regards, Jayadevan DISCLAIMER: "The information in this e-mail and

[PERFORM] Query performance issue

2011-08-31 Thread Jayadevan M
to PostgreSQL and are testing it. Any input on what to look for? Possible relevant parameters are shared_buffers = 4GB temp_buffers = 8MB work_mem = 96MB maintenance_work_mem = 1GB effective_cache_size = 8GB default_statistics_target = 50 It is a machine with 16 GB RAM. Regards, Jayadevan

Re: [PERFORM] Parameters for PostgreSQL

2011-08-03 Thread Jayadevan M
Hello, >The most important spec has been omitted. What's the storage subsystem? We have storage on SAN, RAID 5. > > We are suing weblogic. > ^ > Best. Typo. Ever. > > I hear most people who use it want to, you're just brave enough to do it :-P I wish I could make a few millions

[PERFORM] Parameters for PostgreSQL

2011-08-01 Thread Jayadevan M
on pool or try something else? Regards, Jayadevan DISCLAIMER: "The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contac

Re: [PERFORM] Possible to improve query plan?

2011-01-17 Thread Jayadevan M
dia.org/wiki/Partial_index One link with discussion about it... http://www.devheads.net/database/postgresql/general/when-can-postgresql-use-partial-not-null-index-seems-depend-size-clause-even-enable-seqscan.htm Regards, Jayadevan DISCLAIMER: "The information in this e-mail and any attac

Re: [PERFORM] How to get FK to use new index without restarting the database

2010-12-16 Thread Jayadevan M
> index for the FK cascade delete without bouncing the database. Did you try analyze? May be it will help. http://www.postgresql.org/docs/9.0/static/sql-analyze.html Regards, Jayadevan DISCLAIMER: "The information in this e-mail and any attachment is intended only for the pe

Re: [PERFORM] best db schema for time series data?

2010-11-16 Thread Jayadevan M
lp fetch the data pretty fast. Of course, you could partition on the flag also (we did not have to). A slight processing overhead of updating the valid FLAG column is the penalty. This was an Oracle database. Regards, Jayadevan DISCLAIMER: "The information in this e-mail and any attachme

Re: [PERFORM]

2010-11-15 Thread Jayadevan M
t1 inner join table2 t2 on t1.id = t2.id > and t1.question = t2.question and coalesce(t1.response,'ISNULL') <> > coalesce(t2.response,'ISNULL') > > What gives? They have same indexes/PK etc? Regards, Jayadevan DISCLAIMER: "The information in this

Re: [PERFORM] Questions on query planner, join types, and work_mem

2010-07-27 Thread Jayadevan M
ost characters' or 'only when we take almost all the 101 characters'?) together with a function based index help? Regards, Jayadevan DISCLAIMER: "The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain

Re: [PERFORM] PostgreSQL PITR - more doubts

2010-07-12 Thread Jayadevan M
> Yes, It starts out form "where it needs to". Assuming you >did a pg_start_backup() before you did your base backup? Thanks. I did. It uses files like 000B00D9.0020.backupto get the necessary information? Regards, Jayadevan DISCLAIMER: "The

[PERFORM] PostgreSQL PITR - more doubts

2010-07-12 Thread Jayadevan M
Hello all, One doubt about how PostgreSQL PITR works. Let us say I have all the archived WALs for the past week with archive_command = 'cp -i %p /home/postgres/archive/%f http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] Query about index usage

2010-06-22 Thread Jayadevan M
Thank you for the detailed explanation. Regards, Jayadevan DISCLAIMER: "The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, k

Re: [PERFORM] Query about index usage

2010-06-22 Thread Jayadevan M
eing executed? Do index data get updated as and when data is committed and made 'visible' or is it that index data get updated as soon as data is changed, before commit is issued and rollback of transaction results in a rollback of the index data changes too? Regards, Jayadevan

Re: [PERFORM] Query about index usage

2010-06-13 Thread Jayadevan M
t there yet (in any > production version or in the 9.0 version to be released this > summer). Thank you for all the replies. I am learning PostgreSQL and figuring out which of the standard techniques for tuning queries in Oracle works in PostgreSQL as well. Thank you. Regards, Jayadevan DI

[PERFORM] Query about index usage

2010-06-11 Thread Jayadevan M
d | integer | name | character varying(20) | Indexes: "myidx" btree (id) Regards, Jayadevan DISCLAIMER: "The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or priv

Re: [PERFORM] pg_dump and pg_restore

2010-05-23 Thread Jayadevan M
I increased shared_buffers and maintenance_work_memto 128MB and 64MB and the restore was over in about 20 minutes. Anyway, I am learning about PostgreSQL and it is not a critical situation. Thanks for all the replies. Regards, Jayadevan From: Robert Haas To: Jayadevan M Cc: pgsql

[PERFORM] pg_dump and pg_restore

2010-05-16 Thread Jayadevan M
shared_buffers = 64MB work_mem = 16MB maintenance_work_mem = 16MB synchronous_commit on Thank you for any suggestions. Jayadevan DISCLAIMER: "The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential a

[PERFORM] PostgreSQL - case studies

2010-02-09 Thread Jayadevan M
networking type, but more of on-line reservation type where half an hour down-time can lead to significant revenue losses for customers. Thank you, Jayadevan DISCLAIMER: "The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may c