[GENERAL] Query too slow with not in condition

2008-11-30 Thread சிவகுமார் மா
Dear Friends, I have loaded the backup from a live database in a test system. Both run 8.3.5 versions. The plan for a query varies in these systems. Test System A. PostgreSQL 8.3.5 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20061115 (prerelease) (SUSE Linux) B. explain select * from

Re: [GENERAL] Query too slow with not in condition

2008-11-30 Thread David Rowley
I have loaded the backup from a live database in a test system. Both run 8.3.5 versions. The plan for a query varies in these systems. Test System A. PostgreSQL 8.3.5 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20061115 (prerelease) (SUSE Linux) B. explain select * from

Re: [GENERAL] db backup script in gentoo

2008-11-30 Thread Andrus
Are you using ftp or lftp? lftp is much more scriptable / controllable than regular ftp. I'm using ftp as shown in script. typing lftp shows that this is not found but locate shows something. How to use lftp in this 3-year old gentoo ? Where to find sample script for thos task ? Andrus.

Re: [GENERAL] db backup script in gentoo

2008-11-30 Thread Scott Marlowe
On Sun, Nov 30, 2008 at 3:17 AM, Andrus [EMAIL PROTECTED] wrote: Are you using ftp or lftp? lftp is much more scriptable / controllable than regular ftp. I'm using ftp as shown in script. typing lftp shows that this is not found but locate shows something. How to use lftp in this 3-year old

Re: [GENERAL] Query too slow with not in condition

2008-11-30 Thread Tom Lane
David Rowley [EMAIL PROTECTED] writes: I assume workmem, effective_cache_size and random_page_cost are all the same in the 2 postgresql.conf? Indeed, work_mem is probably the problem. The critical difference between the two plans seems to be that the first one is using a hashed subplan and the

Re: [GENERAL] Question on libpq parameters

2008-11-30 Thread Tom Lane
Owen Hartnett [EMAIL PROTECTED] writes: Yes, it did. I'm confused. My first parameter is a string, but the following two are integers. I thought the paramType parameter indicated the type. Do the integers need to be sprintf'd to strings? Yes. Alternatively, you could pass the integers

Re: [GENERAL] db backup script in gentoo

2008-11-30 Thread Andrus
Sorry, I'm no gentoo expert. It's certainly not the first distro I'd recommend to someone just starting out with linux / unix. Time to break out the google. I also found quite a few example scripts for lftp with google in a few minutes. I must manage existing gentoo server where previous

Re: [GENERAL] db backup script in gentoo

2008-11-30 Thread Scott Marlowe
On Sun, Nov 30, 2008 at 1:18 PM, Andrus [EMAIL PROTECTED] wrote: Sorry, I'm no gentoo expert. It's certainly not the first distro I'd recommend to someone just starting out with linux / unix. Time to break out the google. I also found quite a few example scripts for lftp with google in a

Re: [GENERAL] db backup script in gentoo

2008-11-30 Thread Reid Thompson
Scott Marlowe wrote: On Sun, Nov 30, 2008 at 1:18 PM, Andrus [EMAIL PROTECTED] wrote: Sorry, I'm no gentoo expert. It's certainly not the first distro I'd recommend to someone just starting out with linux / unix. Time to break out the google. I also found quite a few example scripts for lftp

Re: [GENERAL] db backup script in gentoo

2008-11-30 Thread Andrus
Scott, emerge lftp root # emerge lftp Calculating dependencies... done! Emerging (1 of 1) net-ftp/lftp-3.4.6 to / Downloading 'http://distfiles.gentoo.org/distfiles/lftp-3.4.6.tar.gz' --23:39:28-- http://distfiles.gentoo.org/distfiles/lftp-3.4.6.tar.gz =

Re: [GENERAL] db backup script in gentoo

2008-11-30 Thread Scott Marlowe
On Sun, Nov 30, 2008 at 3:16 PM, Andrus [EMAIL PROTECTED] wrote: Scott, emerge lftp root # emerge lftp Calculating dependencies... done! Emerging (1 of 1) net-ftp/lftp-3.4.6 to / Downloading 'http://distfiles.gentoo.org/distfiles/lftp-3.4.6.tar.gz' --23:39:28--

Re: [GENERAL] db backup script in gentoo

2008-11-30 Thread Guy Rouillier
Andrus wrote: There are no console users in this server other than root. /home directory is empty. console access is used only some times in year. Andrus, I don't know how this conversation ended up on a PG mailing list, but Gentoo maintains many user forums where people are happy to answer

Re: [GENERAL] Question on libpq parameters

2008-11-30 Thread Owen Hartnett
At 1:26 PM -0500 11/30/08, Tom Lane wrote: Owen Hartnett [EMAIL PROTECTED] writes: Yes, it did. I'm confused. My first parameter is a string, but the following two are integers. I thought the paramType parameter indicated the type. Do the integers need to be sprintf'd to strings? Yes.

Re: [GENERAL] Trigger before delete does fire before, but delete doesn't not happen

2008-11-30 Thread Stéphane A. Schildknecht
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Adrian Klaver a écrit : On Friday 28 November 2008 3:47:10 am Stéphane A. Schildknecht wrote: drop table commande cascade; drop table commandeligne; CREATE TABLE commande ( id integer NOT NULL, montant real, CONSTRAINT id PRIMARY KEY

Re: [GENERAL] Query too slow with not in condition [Resolved]

2008-11-30 Thread சிவகுமார் மா
Thanks a lot. On Sun, Nov 30, 2008 at 11:28 PM, Tom Lane [EMAIL PROTECTED] wrote: David Rowley [EMAIL PROTECTED] writes: I assume workmem, effective_cache_size and random_page_cost are all the same in the 2 postgresql.conf? Indeed, work_mem is probably the problem. The critical

Re: [GENERAL] Query too slow with not in condition

2008-11-30 Thread சிவகுமார் மா
On Sun, Nov 30, 2008 at 3:28 PM, David Rowley [EMAIL PROTECTED] wrote: You might find this page interesting: http://www.depesz.com/index.php/2008/08/13/nulls-vs-not-in/ Thanks David. Another issue I was faced with was exactly what the link you provided discusses. Best regards, Ma Sivakumar