From: | Dave Cramer <pg(at)fastcrypt(dot)com> |
---|---|
To: | Mario Splivalo <mario(dot)splivalo(at)megafon(dot)hr> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Forcing postgres NOT to use sequential scan, trough JDBC |
Date: | 2009-03-06 11:40:51 |
Message-ID: | 491f66a50903060340r59a8b4e1v165f3374dc40e389@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
I would suggest to you that something else is wrong. In order for postgresql
to use the most efficient method all of the tuning parameters have to be
configured properly. The performance list is a better place to discuss this.
On Fri, Mar 6, 2009 at 5:50 AM, Mario Splivalo <mario(dot)splivalo(at)megafon(dot)hr>wrote:
> How do I tell postgres not to use sequential scan, trough jdbc?
>
> I tried to include 'SET enable_seqscan TO false;' at the begining of the
> plpgsql function, but that seems to work only if I call the function trough
> the psql, and only for the subsequent calls in the current session. I 'know'
> that postgres is using sequential scan because function call takes cca
> 400ms. When I force postgres not to use sequential scan, the function takes
> around 5-10ms.
>
> I even tried, on the same connection, to issue 'SET enable_seqscan TO
> false;' trough jdbc before I call my function, but execution time is still
> around 400ms.
>
> Mike
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>
From | Date | Subject | |
---|---|---|---|
Next Message | Agustin CS | 2009-03-06 11:59:17 | Batch insert order and current_timestamp |
Previous Message | Mario Splivalo | 2009-03-06 10:50:12 | Forcing postgres NOT to use sequential scan, trough JDBC |