[PERFORM] Is there an equivalent for Oracle's user_tables.num_rows

2007-02-09 Thread Virag Saksena
All, I am looking to automate analyze table in my application. I have some insert only tables in my application which I need to analyze as data grows. Since the inserts are application controlled, I can choose to run analyze when I determine the data has grown more than x% since last

Re: [PERFORM] Is there an equivalent for Oracle's user_tables.num_rows

2007-02-09 Thread Virag Saksena
Saksena [EMAIL PROTECTED] Cc: pgsql-performance@postgresql.org Sent: Friday, February 09, 2007 4:45 PM Subject: Re: [PERFORM] Is there an equivalent for Oracle's user_tables.num_rows Virag Saksena [EMAIL PROTECTED] writes: Does someone know of a way of telling what the optimizer believes

[PERFORM] Cost Issue - How do I force a Hash Join

2006-02-20 Thread Virag Saksena
Hi, I have query where I do two inline queries (which involves grouping) and then join them with an outer join. The individual queries run in 50-300 ms. However the optimizer is choosing a nested loop to join them rather than a Hash join causing the complete query to take 500+ seconds. It

Re: [PERFORM] Cost Issue - How do I force a Hash Join

2006-02-20 Thread Virag Saksena
= outer.childaddr)) Total runtime: 9950.192 ms Regards, Virag - Original Message - From: Tom Lane [EMAIL PROTECTED] To: Virag Saksena [EMAIL PROTECTED] Cc: pgsql-performance@postgresql.org Sent: Monday, February 20, 2006 9:35 PM Subject: Re: [PERFORM] Cost Issue - How do I force a Hash Join

Re: [PERFORM] Avoiding cartesian product

2006-02-19 Thread Virag Saksena
DISTINCT values. The idea of DISTINCTing by both columns is to make sure the planner finds the index. (lately I had a similar problem: WHERE a=1 ORDER BY b LIMIT 1 used an index on b, instead of an (a,b) index. Using ORDER BY a,b solved it) HTH, -- G. On 2006.01.04. 5:12, Virag Saksena

[PERFORM] Avoiding cartesian product

2006-01-03 Thread Virag Saksena
I have a table which stores cumulative valuesI would like to display/chart the deltas between successive data collections If my primary key only increments by 1, I could write a simple query select b.gc_minor - a.gc_minor, b.gc_major - a.gc_major from jam_trace_sys a, jam_trace_sys bwhere

[PERFORM] ERROR: no value found for parameter 1 with JDBC and Explain Analyze

2005-11-18 Thread Virag Saksena
Hi, I am trying to use Explain Analyze to trace a slow SQL statement called from JDBC. The SQL statement with the parameters taked 11 seconds. When I run a explain analyze from psql, it takes 50 ms with a reasonable explain plan. However when I try to run an explain analyze from JDBC with the