[GENERAL] How to force the parser to use index scan instead of sequential scan

2006-10-07 Thread ck
parser to use index scan instead of sequential scan in the above case. Thanks in advance. ck ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your

[GENERAL] Duplicate Key Violates Unique Contraint when Updating a table

2007-06-24 Thread carter ck
where myid='ABC123567778'; Can anyone help? All helps and solutions are appreciated. THanks. CK _ Check it out! Windows Live Spaces is here! http://spaces.live.com/?mkt=en-sg It’s easy to create your o

Re: [GENERAL] Duplicate Key Violates Unique Contraint whenUpdating a table

2007-06-24 Thread carter ck
kindly post a feedback. THanks. From: Ragnar <[EMAIL PROTECTED]> To: carter ck <[EMAIL PROTECTED]> CC: pgsql-general@postgresql.org Subject: Re: [GENERAL] Duplicate Key Violates Unique Contraint whenUpdating a table Date: Sun, 24 Jun 2007 10:05:16 + On sun, 2007-06-24 at 16:55 +

[GENERAL] Database Select Slow

2007-08-10 Thread carter ck
Hi all, I am facing a performance issue here. Whenever I do a count(*) on a table that contains about 300K records, it takes few minutes to complete. Whereas my other application which is counting > 500K records just take less than 10 seconds to complete. I have indexed all the essential col

Re: [GENERAL] Database Select Slow

2007-08-15 Thread carter ck
Hi, Thanks for the clarification. It helps to resolve the problem. Now, the page can be fully loaded within 2 seconds. Thanks. From: "Scott Marlowe" <[EMAIL PROTECTED]> To: "carter ck" <[EMAIL PROTECTED]> CC: pgsql-general@postgresql.org Subject: Re: [GE

[GENERAL]

2007-10-30 Thread carter ck
Hi all, I was trying to create function in postgres, but it returns error mentioning the language is NOT defined. The function is as following: CREATE OR REPLACE FUNCTION test_word_count(TEXT, TEXT) RETURNS INTEGER AS $$ DECLARE d_word ALIAS FOR $1; d_phrase ALIAS FOR $2; BEGIN IF d_word IS

[GENERAL] Improve Search

2007-11-01 Thread carter ck
Hi all, Has anyone come across a solution for faster and powerful search stored procedure in a table that contains more than 500K of records? I am currently trying to work around with it. All helps are appreciated. Thanks. _ Exp

Re: [GENERAL] Improve Search

2007-11-02 Thread carter ck
. Thanks. > Date: Thu, 1 Nov 2007 22:32:47 -0500 > From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > Subject: Re: [GENERAL] Improve Search > CC: pgsql-general@postgresql.org > > On 11/1/07, carter ck wrote: >> >> Hi al

[GENERAL] Postrgres Sequence Error

2006-10-22 Thread carter ck
Hi all, Currently I am ancountering a sequnce error. THe sequence number is being used up to 573, but, suddenly and unexpectedly, when I issue the select nextval command, it gives the value of 400, which is currently occupied by a record. I am looking forward for any possible solution to sol

[GENERAL] IS it a good practice to use SERIAL as Primary Key?

2006-11-22 Thread carter ck
Hi all, I am wonderring if it is a good practice to use SERIAL index as primary key, as it is only available up to 999? Currently i am dealing with storing LDAP users into Postgres and i am looking for a better way to make use of the DN as primary key instead of SERIAL index. Any advic

[GENERAL] Improve Postgres Query Speed

2007-01-15 Thread carter ck
Hi all, I am having slow performance issue when querying a table that contains more than 1 records. Everything just slow down when executing a query though I have created Index on it. Can anyone suggest ways to improve the speed? Thanks. ___

Re: [GENERAL] Improve Postgres Query Speed

2007-01-15 Thread carter ck
" btree (msg_status) Thanks for help. From: "Chad Wagner" <[EMAIL PROTECTED]> To: "carter ck" <[EMAIL PROTECTED]> CC: pgsql-general@postgresql.org Subject: Re: [GENERAL] Improve Postgres Query Speed Date: Mon, 15 Jan 2007 19:54:51 -0500 On 1/15/07, carter ck <

Re: [GENERAL] Improve Postgres Query Speed

2007-01-15 Thread carter ck
Hi, the rpt_generated is a boolean value. And you are definitely right when updating the table. The time it takes is getting longer and longer. When I do a select statement, the speed has also degraded. Thanks. From: Jorge Godoy <[EMAIL PROTECTED]> To: "carter ck" <[E

[GENERAL] Linking a Postgres table on Linux to Ms Access

2007-01-25 Thread carter ck
Hi all, Is there any way that I can synchronize a table in Postgres on Linux with another table in Ms Access? The requirement of the assignment is as following: In postgres, there is a table called message_received. Whenever we insert, update or edit this table, the table in Ms Access should

[GENERAL] How to create an archive for old records?

2007-02-14 Thread carter ck
Hi all, I am looking for ways to create an archive of records older than 3 months in one of my table, and store these extracted records into a local database. Does Postgres have any command to do this? Thanks. _ Find just what y

[GENERAL] Creating Index

2007-04-22 Thread carter ck
Hi all, I am wonderring the differences between creating an index on several columns of a table and an index on each column of a table. For example, following is my select query: select * from my_table where myrowid='abc' and mytask='TEst 1' and myday!='holiday'; Which of the following is

Re: [GENERAL] PRIMARY KEY on a *group* of columns imply that each

2005-04-27 Thread Sebastian Böck
Stephane Bortzmeyer wrote: On Wed, Apr 27, 2005 at 04:50:23PM +0200, Sebastian Böck <[EMAIL PROTECTED]> wrote a message of 48 lines which said: CREATE UNIQUE INDEX na ON x (name, address) WHERE address IS NULL; No, because it prevents two tuples with the same value of "name". Ahh, sorry! Ment

Re: [GENERAL] Update on tables when the row doesn't change

2005-05-24 Thread Sebastian Böck
Jaime Casanova wrote: On 5/24/05, Sebastian Böck <[EMAIL PROTECTED]> wrote: Martijn van Oosterhout wrote: I'm sure I'm not the only one, but, what are you talking about? RULEs are not really obvious so it would help if you could post an example of what you mean... I attach some sample SQL (

Re: [GENERAL] Update on tables when the row doesn't change

2005-05-25 Thread Sebastian Böck
Dawid Kuroczko wrote: On 5/24/05, Sebastian Böck <[EMAIL PROTECTED]> wrote: /* 3rd way of separating updates con: unnecessary updates on tables pro: view gets evaluated only 1 time Not adressing the problem of unnecessary updates, but the view gets only evaluated one time. */ CREATE

Re: [GENERAL] Update on tables when the row doesn't change

2005-05-25 Thread Sebastian Böck
Martijn van Oosterhout wrote: Well, I havn't run the rule so I don't know exactly whether it is relevent, but simply put, RULEs are like *macro substitution*. In macros, if you specify an expression (like a view) as an argument, it is placed as a whole each place the argument is used. Yes I und

Re: [GENERAL] Update on tables when the row doesn't change

2005-05-25 Thread Sebastian Böck
Ragnar Hafstað wrote: On Wed, 2005-05-25 at 13:09 +0200, Sebastian Böck wrote: Dawid Kuroczko wrote: Be wary of the NULL values though. :) Either don't use them, add something like 'AND (text1 <> NEW.text1 OR text1 IS NULL OR NEW.text1 IS NULL)' or something more complicated. :) Thanks fo

Re: [GENERAL] Bug with view definition?

2005-06-08 Thread Sebastian Böck
Richard Huxton wrote: Sebastian Böck wrote: Hello all, why is the last definition of a view not working, although the documentation says all three are equal? CREATE OR REPLACE VIEW not_working AS SELECT one.* FROM one.one, two.two JOIN join1 ON join1.id = one.id; I think it'