Re: [SQL] Insert only if not found

2007-04-05 Thread A. Kretschmer
am Thu, dem 05.04.2007, um 10:38:21 +0200 mailte Shavonne Marietta Wijesinghe folgendes: Hello everyone.. Here is the result of my Insert. and also the insert works ok. INSERT INTO MOD48_02 (ID, TE_INDI, TE_COGNOME, TE_NOME, TE_SESSO, TE_ATTNASC, TE_LUONASC, TE_DTNASC, TE_PROVSTATO,

Re: [SQL] slow query

2007-04-05 Thread Tom Lane
A. Kretschmer [EMAIL PROTECTED] writes: am Thu, dem 05.04.2007, um 1:27:25 -0400 mailte Tom Lane folgendes: I'm betting the problem is poor vacuuming practice leading to lots of dead space. There's no way it takes 22 sec to read 10 rows if the table is reasonably dense. This was my first

Re: [SQL] Insert only if not found

2007-04-05 Thread Shavonne Marietta Wijesinghe
wow thanks. i managed to paste it to fit my code.. yea ^^ Shavonne Wijesinghe www.studioform.it - Original Message - From: A. Kretschmer [EMAIL PROTECTED] To: pgsql-sql@postgresql.org Sent: Thursday, April 05, 2007 10:53 AM Subject: Re: [SQL] Insert only if not found am

[SQL] Insert only if not found

2007-04-05 Thread Shavonne Marietta Wijesinghe
Hello everyone.. Here is the result of my Insert. and also the insert works ok. INSERT INTO MOD48_02 (ID, TE_INDI, TE_COGNOME, TE_NOME, TE_SESSO, TE_ATTNASC, TE_LUONASC, TE_DTNASC, TE_PROVSTATO, TE_PROV, TE_PATERNITA, TE_RICHIESTA, USERNAME, DATE_INSERTED, TIME_INSERTED) VALUES

Re: [SQL] Insert only if not found

2007-04-05 Thread Shavonne Marietta Wijesinghe
I think i spoke to soon. It works. But if i change a letter from capital to simple it inserts my record 2 times. So i have 2 records for Shavonne and shavonne. So i thought i would do the select in uppercase. INSERT INTO MOD48_02 (ID, TE_INDI, TE_COGNOME, TE_NOME, TE_SESSO, TE_ATTNASC,

Re: [SQL] Insert only if not found

2007-04-05 Thread A. Kretschmer
am Thu, dem 05.04.2007, um 11:47:35 +0200 mailte Shavonne Marietta Wijesinghe folgendes: I think i spoke to soon. It works. But if i change a letter from capital to simple it inserts my record 2 times. So i have 2 records for Shavonne and shavonne. So i thought i would do the select in

Re: [SQL] slow query

2007-04-05 Thread Andrew Sullivan
On Thu, Apr 05, 2007 at 01:47:03AM -0400, Tom Lane wrote: [ shrug... ] If the damage is already done, lazy VACUUM won't fix it. Also, if there are enough open transactions at any one time and sufficient churn in the table, lazy VACUUM may not be able to keep up. (We had that experience with

[SQL] Another date range join problem

2007-04-05 Thread Gary Stainburn
Hi folks, me again. I'm back with my availability and roster tables again. I have: Table public.availability Column |Type ---+ aid | serial primary key asid | integer asdate| date

Re: [SQL] LOG: unexpected EOF on client connection

2007-04-05 Thread Tom Lane
[EMAIL PROTECTED] writes: FATAL: sorry, too many clients already You need a larger max_connections setting. LOG: unexpected EOF on client connection I think pgbench just dies ungracefully if it gets a connection failure. regards, tom lane

Re: [SQL] Generating dates prior to generate_series

2007-04-05 Thread Scott Marlowe
On Wed, 2007-04-04 at 07:00, Roger Tannous wrote: I'm using PostgreSQL version 7.3.2, and generate_series() is not available, so this is a function to generate a series dates. The function goes backwards if the second argument is less than the first one. Check the two select statements at

[SQL] SOLVED - Another date range join problem

2007-04-05 Thread Gary Stainburn
I've managed to come up with a solution that works, and embellished it to give exactly what I want. create view availability_details as select aid, asid, asdate, afdate, adays, count(rsgid) as allocated, adays-count(rsgid) as afree from ( select aid, asid, asdate, afdate,

[SQL] auto vacuuming

2007-04-05 Thread Sumeet
Hi all is there a way i can find if the pg_autovacuum module is installed on my server?? The postgres version im using is 8.1.4 I tried searching the contrib module and dint see the pg_autovacuum directory there I checked m source Thanks, Sumeet

Re: [SQL] auto vacuuming

2007-04-05 Thread Alvaro Herrera
Sumeet escribió: Hi all is there a way i can find if the pg_autovacuum module is installed on my server?? The postgres version im using is 8.1.4 I tried searching the contrib module and dint see the pg_autovacuum directory there pg_autovacuum no longer exists. Autovacuum is now integrated

Re: [SQL] auto vacuuming

2007-04-05 Thread Sumeet
Then do i need to still provide the auto vacumming options in the postgres.conf file or these options are automatically taken care of. Thanks, Sumeet. On 4/5/07, Alvaro Herrera [EMAIL PROTECTED] wrote: Sumeet escribió: Hi all is there a way i can find if the pg_autovacuum module is installed

Re: [SQL] auto vacuuming

2007-04-05 Thread Alvaro Herrera
Sumeet escribió: Then do i need to still provide the auto vacumming options in the postgres.conf file or these options are automatically taken care of. You have to enable the autovacuum setting in postgresql.conf. It is not enabled by default. -- Alvaro Herrera

Re: [SQL] Insert only if not found

2007-04-05 Thread Roger Tannous
It's also desirable that you use TRIM along with UPPER or LOWER. Roger. Don't pick lemons. See all the new 2007 cars at Yahoo! Autos. http://autos.yahoo.com/new_cars.html ---(end