[GENERAL] disable seqscan

2011-05-23 Thread Nick Raj
Hi, I have build an index. When, i execute the query, it gives the result by sequential scan, not by using my index. I have already run vacuum analyze to collect some statistics regarding table. May be sequential scan is giving faster execution time than my indexing. But i want to know how much ti

Re: [GENERAL] disable seqscan

2011-05-23 Thread Andrew Sullivan
On Mon, May 23, 2011 at 05:31:04PM +0530, Nick Raj wrote: > Hi, > I have build an index. When, i execute the query, it gives the result by > sequential scan, not by using my index. > For that, i have set enable_seqscan=off in postgresql.conf. But it still > going through sequential scan. It sound

Re: [GENERAL] disable seqscan

2011-05-23 Thread Andreas Kretschmer
Andrew Sullivan wrote: > On Mon, May 23, 2011 at 05:31:04PM +0530, Nick Raj wrote: > > Hi, > > I have build an index. When, i execute the query, it gives the result by > > sequential scan, not by using my index. > > > For that, i have set enable_seqscan=off in postgresql.conf. But it still > > g

Re: [GENERAL] disable seqscan

2011-05-23 Thread Nick Raj
On Mon, May 23, 2011 at 5:44 PM, Andreas Kretschmer < akretsch...@spamfence.net> wrote: > Andrew Sullivan wrote: > > > On Mon, May 23, 2011 at 05:31:04PM +0530, Nick Raj wrote: > > > Hi, > > > I have build an index. When, i execute the query, it gives the result > by > > > sequential scan, not by

Re: [GENERAL] disable seqscan

2011-05-23 Thread Andreas Kretschmer
Nick Raj wrote: > > On Mon, May 23, 2011 at 5:44 PM, Andreas Kretschmer > > wrote: > > Andrew Sullivan wrote: > > > On Mon, May 23, 2011 at 05:31:04PM +0530, Nick Raj wrote: > > > Hi, > > > I have build an index. When, i execute the query, it gives the result > by >

[GENERAL] Postgres 8.3.5 - ECPG and the use of descriptors and cursors in multi-threaded programs

2011-05-23 Thread Leif Jensen
Hello Guys, In a multi-threaded server program using Postgresql 8.3.5 with ECPG interface for C, we have problems using descriptors (and possibly cursors). We have created a common database interface module with basically 1 function: SQLExec(). In the 'select' part of this function

Re: [GENERAL] Where are plpy.execute python commands issued?

2011-05-23 Thread Sim Zacks
On 05/23/2011 06:44 AM, Michael McInnis wrote: I've seen numerous references to this syntax but haven't found where you issue the command. Tried it in a testpython.py file, no luck. Can't find a plpy file anywhere. I know it's going to be simple but need help. rv = plpy.execute("SELECT * FROM

Re: [GENERAL] disable seqscan

2011-05-23 Thread Tom Lane
Nick Raj writes: >> Andrew Sullivan wrote: >>> It sounds like your index can't actually be used to satisfy your >>> query. Without seeing the table definition, index definition, and >>> query, however, it's pretty hard to give you a real answer. >> explain analyze select * from vehicle_stindex

[GENERAL] Using right() in a view

2011-05-23 Thread Chrishelring
Hi all, please foregive me for this rather trivial question, but I´ve worked in it for quite som time and could use som help now. :) I have a table where it want to create a idkey using our municipality number + the road number + the housenumber. The municipality and housenumber is in a fixed si

[GENERAL] Postgre Client only install on Linux- 8.4.7

2011-05-23 Thread Chitra Vasamsetty
Hi, How can i install only the postgre client on an RHEL 5.5 machine?? I have installed the server running the ./postgresql-8.4.7-1-linux-x64.bin command. Any help appreciated... Thanks Chitra

[GENERAL] Postgre Client only Install on Linux- 8.4.7

2011-05-23 Thread Chitra
Hi, How can i install only the postgre client on an RHEL 5.5 machine?? I have installed the server running the ./postgresql-8.4.7-1-linux-x64.bin command. Any help appreciated... Thanks Chitra

Re: [GENERAL] Using right() in a view

2011-05-23 Thread Bosco Rama
Chrishelring wrote: > > CREATE OR REPLACE VIEW test AS > SELECT > right(cast('000' as text) || cast(road_number as text), 4) AS GEO_ADRESSE > > FROM rk_ois.bbrbygning > WHERE ejerlav <> 0 > > to ensure that the road_number would be a fixed size (four digitis). > Unfortunately this doesn't

Re: [GENERAL] Postgres 8.3.5 - ECPG and the use of descriptors and cursors in multi-threaded programs

2011-05-23 Thread Bosco Rama
Leif Jensen wrote: > > This seems to be working most of the time, but looking at the generated C > code from the ecpg compiler and the associated library functions, we are > not sure whether we should put mutex locks around the 'select' part to > avoid several threads are using "the same" execdesc

Re: [GENERAL] Postgre Client only Install on Linux- 8.4.7

2011-05-23 Thread John R Pierce
On 05/23/11 5:16 AM, Chitra wrote: How can i install only the postgre client on an RHEL 5.5 machine?? I have installed the server running the ./postgresql-8.4.7-1-linux-x64.bin command. use the rpms from the yum repository, postgresql-libs is the runtime client software. see http://yum.pgrp

Re: [GENERAL] Trapping errors

2011-05-23 Thread David Johnston
UPDATE tbl SET score = divide_double_default(score, s, 1e-200) ... UPDATE tbl SET score = multiply_double_default(score, s, 9) ... Code the divide_double_default/multiply_double_default functions with error handling that will return the desired value (either zero or the supplied paramete

Re: [GENERAL] strange behaviour in 9.0.2 / ERROR: 22003: value out of range: overflow

2011-05-23 Thread rudi
On 20 Mai, 22:55, rudi wrote: > Hi all, > > I feel like I hit a bug in postgres 9.0.2 with a query like this > (there's actually a quite complicated view hidden behind), however > note > the  'IN' selection contains two identical keys. When I execute a > similar query without the duplicate, the qu

[GENERAL] Postgres questions

2011-05-23 Thread Trenta sis
Hi, I have Debian Lenny server with Postgres 8.3 that is workin correctly, but I have some questions about this installation. This server is working whitout any problem but it is a little critical and I need to know how can I do... - I need to connect from postgres to other database (linked ser

Re: [GENERAL] Postgres questions

2011-05-23 Thread Craig Ringer
On 24/05/2011 6:10 AM, Trenta sis wrote: - I need to connect from postgres to other database (linked server) no postgres (for example with jdbc or odbc). I have tried to work with dbi-link with sql, it seems to work but with poor performance and whit other database different mssql is not working

[GENERAL] PostgreSQL and SSIS

2011-05-23 Thread Bailey, Rick
I have an Microsoft SQL Server IS job that has been running in production for several years. It pulls data from a PostgreSQL 8.4.2 database on Linux into an SQL Server 2005 installation on Windows Server 2003 (all 32-bit). I am re-writing this in a test environment that consists of the same P

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-23 Thread jun yang
2011/5/23 Craig Ringer : > On 23/05/2011 10:13 AM, jun yang wrote: > >> actually, we will write the procedure in pl/python,then fork a new >> thread or a new process which is easy. > > Yikes. Be careful there - it's not as easy as you think it is. > > Spawning a new thread within a PostgreSQL backe

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-23 Thread Rick Genter
On May 23, 2011, at 9:46 PM, jun yang wrote: > thanks for the info,i am just not have such deep learn of pg internal, > i am on user level,not hacker,so the mail is in pgsql-general,not > hacker list. What you are asking to do is not a typical user function. It would be more appropriate for a "

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-23 Thread Craig Ringer
On 24/05/11 12:46, jun yang wrote: > thanks for the info,i am just not have such deep learn of pg internal, > i am on user level,not hacker,so the mail is in pgsql-general,not > hacker list. Then you really, really, REALLY don't want to start a thread within the backend, and should avoid spawning

Re: [GENERAL] PostgreSQL and SSIS

2011-05-23 Thread Craig Ringer
On 24/05/11 04:38, Bailey, Rick wrote: > On the Windows Server 2008R2 machine, I installed 64 bit Postgres ODBC > drivers and found that I could not see them when creating an ADO.net > connection manager in BIDS. "BIDS" appears to be the Microsoft "Business Intelligence Development Studio," an ad

Re: [GENERAL] PostgreSQL and SSIS

2011-05-23 Thread Dann Corbit
> -Original Message- > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] On Behalf Of Craig Ringer > Sent: Monday, May 23, 2011 11:00 PM > To: Bailey, Rick > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] PostgreSQL and SSIS > > On 24/05/11

Re: [GENERAL] disable seqscan

2011-05-23 Thread Nick Raj
On Mon, May 23, 2011 at 7:35 PM, Tom Lane wrote: > Nick Raj writes: > >> Andrew Sullivan wrote: > >>> It sounds like your index can't actually be used to satisfy your > >>> query. Without seeing the table definition, index definition, and > >>> query, however, it's pretty hard to give you a re

Re: [GENERAL] PostgreSQL and SSIS

2011-05-23 Thread John R Pierce
On 05/23/11 1:38 PM, Bailey, Rick wrote: I have an Microsoft SQL Server IS job that has been running in production for several years. It pulls data from a PostgreSQL 8.4.2 database on Linux into an SQL Server 2005 installation on Windows Server 2003 (all 32-bit). I am re-writing this in a