Re: [PERFORM] Expected performance of querying 5k records from 4 million records?

2012-06-18 Thread Anish Kejariwal
to (dataset_id, stat_id,data_id) thanks! On Fri, Jun 15, 2012 at 11:20 AM, Jeff Janes jeff.ja...@gmail.com wrote: On Fri, Jun 15, 2012 at 9:17 AM, Anish Kejariwal anish...@gmail.com wrote: Below are the tables, queries, and execution plans with my questions with more detail. (Since I have 250

[PERFORM] Expected performance of querying 5k records from 4 million records?

2012-06-15 Thread Anish Kejariwal
I've been struggling with this issue for the last several days, and I feel like I'm running into a few different issues that I don't understand. I'm using postgres 9.0.8, and here's the OS I'm running this on: inux 2.6.18-308.4.1.el5xen #1 SMP Tue Apr 17 17:49:15 EDT 2012 x86_64 x86_64 x86_64

Re: [PERFORM] Calculating statistic via function rather than with query is slowing my query

2011-08-18 Thread Anish Kejariwal
postgres. thanks, Anish On Wed, Aug 17, 2011 at 10:32 PM, Craig Ringer ring...@ringerc.id.auwrote: On 18/08/2011 9:03 AM, Anish Kejariwal wrote: Thanks for the help Pavel and Craig. I really appreciate it. I'm going to try a couple of these different options (write a c function, use a sql

[PERFORM] Calculating statistic via function rather than with query is slowing my query

2011-08-17 Thread Anish Kejariwal
Hi everyone, I'm using postgres 9.0.3, and here's the OS I'm running this on: Linux 2.6.18-238.12.1.el5xen #1 SMP Tue May 31 14:02:29 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux I have a fairly straight forward query. I'm doing a group by on an ID, and then calculating some a statistic on the

Re: [PERFORM] Calculating statistic via function rather than with query is slowing my query

2011-08-17 Thread Anish Kejariwal
AM, Pavel Stehule pavel.steh...@gmail.comwrote: Hello 2011/8/17 Anish Kejariwal anish...@gmail.com: Hi everyone, I'm using postgres 9.0.3, and here's the OS I'm running this on: Linux 2.6.18-238.12.1.el5xen #1 SMP Tue May 31 14:02:29 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux I have

Re: [PERFORM] Calculating statistic via function rather than with query is slowing my query

2011-08-17 Thread Anish Kejariwal
particular case. thanks! Anish On Wed, Aug 17, 2011 at 5:05 PM, Craig Ringer ring...@ringerc.id.au wrote: On 18/08/2011 3:00 AM, Anish Kejariwal wrote: Thanks Pavel! that definitely solved it. Unfortunately, the function I gave you was a simple/short version of what the actual function

Re: [PERFORM] issue with query optimizer when joining two partitioned tables

2011-07-10 Thread Anish Kejariwal
Linnakangas heikki.linnakan...@enterprisedb.com writes: On 09.07.2011 00:36, Anish Kejariwal wrote: My guess as to what happened: -because the icecream parent table has zero records, the query optimizer chooses the incorrect execution plan -when I do select * from icecream, the optimizer now knows

[PERFORM] issue with query optimizer when joining two partitioned tables

2011-07-08 Thread Anish Kejariwal
I have run into issue where the query optimizer is choosing the wrong execution plan when I'm trying to join two large tables that have been partitioned. I would really appreciate it if someone could help me out this. I don't know whether I've found a bug in the optimizer, or whether there is