Re: [SQL] Eh?

2001-08-13 Thread Tod McQuillin
On Mon, 13 Aug 2001, Josh Berkus wrote: > > > SHould I be concerned about this? > > > > > DEBUG: geqo_main: using edge recombination crossover [ERX] > > > > Nope. See > > http://www.ca.postgresql.org/users-lounge/docs/7.1/postgres/geqo.html > > Cool! I love it when I actually get the chance to

Re: [SQL] Eh?

2001-08-13 Thread Josh Berkus
Tom, > > SHould I be concerned about this? > > > DEBUG: geqo_main: using edge recombination crossover [ERX] > > Nope. See > http://www.ca.postgresql.org/users-lounge/docs/7.1/postgres/geqo.html Cool! I love it when I actually get the chance to see some advance theory applied. And congrats

Re: [SQL] Eh?

2001-08-13 Thread Tom Lane
"Josh Berkus" <[EMAIL PROTECTED]> writes: > SHould I be concerned about this? > DEBUG: geqo_main: using edge recombination crossover [ERX] Nope. See http://www.ca.postgresql.org/users-lounge/docs/7.1/postgres/geqo.html regards, tom lane ---(end

[SQL] Eh?

2001-08-13 Thread Josh Berkus
Tom, Stephan, SHould I be concerned about this? DEBUG: geqo_main: using edge recombination crossover [ERX] DEBUG: geqo_main: using edge recombination crossover [ERX] It happens when I run a truly massive (>2000 chars) query ... -Josh __AGLIO DATABASE SOLUTIONS__

[SQL] Re: optimizing select ... not in (select ...)

2001-08-13 Thread Laurent Martelli
> "Tomas" == Tomas Berndtsson <[EMAIL PROTECTED]> writes: Tomas> Laurent Martelli <[EMAIL PROTECTED]> writes: >> I have this query : >> >> select distinct on (Pictures.PictureID) * from Pictures where >> Pictures.PictureID not in (select distinct PictureID from >> Keywords); >>

Re: [SQL] optimizing select ... not in (select ...)

2001-08-13 Thread Bruce Momjian
Can it be redone using NOT EXISTS? > I have this query : > > select distinct on (Pictures.PictureID) * from Pictures where Pictures.PictureID not >in (select distinct PictureID from Keywords); > > and I find it a bit slow. Does anybody have suggestions to run this > faster ? (I have indexes o

Re: [SQL] optimizing select ... not in (select ...)

2001-08-13 Thread Tomas Berndtsson
Laurent Martelli <[EMAIL PROTECTED]> writes: > I have this query : > > select distinct on (Pictures.PictureID) * from Pictures where Pictures.PictureID not >in (select distinct PictureID from Keywords); > > and I find it a bit slow. Does anybody have suggestions to run this > faster ? (I have

Re: [SQL] optimizing select ... not in (select ...)

2001-08-13 Thread Josh Berkus
Laurent, > select distinct on (Pictures.PictureID) * from Pictures where > Pictures.PictureID not in (select distinct PictureID from Keywords); > > and I find it a bit slow. Does anybody have suggestions to run this > faster ? (I have indexes on PictureID on both Pictures and Keywords) NOT IN

[SQL] Re: REFERENCES constraint

2001-08-13 Thread agutier
[EMAIL PROTECTED] (Cedar Cox) wrote in message news:<[EMAIL PROTECTED]>... > On Wed, 8 Aug 2001, Jan Wieck wrote: > > Josh Berkus wrote: > > > Cedar, > > > > > > > 1. Can a column reference more than one table? (This assumes you use > > > > a > > > > single sequence to generate the IDs for both

[SQL] Re: Donations?

2001-08-13 Thread Laurent Martelli
> "Josh" == "Josh Berkus" <[EMAIL PROTECTED]> writes: Josh> Core team, Josh> I may be able to build a small donation towards postgresql Josh> development into my next project fee. However, I am unsure of Josh> where I can send a check so that it will go directly towards Josh> Post

[SQL] optimizing select ... not in (select ...)

2001-08-13 Thread Laurent Martelli
I have this query : select distinct on (Pictures.PictureID) * from Pictures where Pictures.PictureID not in (select distinct PictureID from Keywords); and I find it a bit slow. Does anybody have suggestions to run this faster ? (I have indexes on PictureID on both Pictures and Keywords) -- L

Re: [SQL] prob with PERL/Postgres

2001-08-13 Thread Kate Collins
I use the Perl DBI module to connect to a postgres data base on the local system. I don't specify the host name. This is the syntax I use to connect to the data base: use DBI; $dbname = "foo"; $connstr = "dbi:Pg:dbname=$dbname"; $dbh = DBI->connect($connstr); Kristopher Yates wrote: > PERL S

[SQL] Mirroring the database?

2001-08-13 Thread Raymond Chui
Does the latest PostgreSQL 7.1.2 support database mirroring? I have machine A, B and C, they all have the same database and tables. Machine A is the operational machine, machine B and C are backup. If users do INSERT, UPDATE and DELETE in machine A, I want have the same SQL statements in machine

Re: [SQL] Arithmetic operation on DATE

2001-08-13 Thread Karel Zak
On Mon, Aug 13, 2001 at 05:48:57PM +0800, macky wrote: > is it possible to add a date datatype column to a number resulting to a > date.. > > > theoretically it should do this,,, > > X is in months > > date + X = date > > --> 2001-08-20 + 6 = 2002-02-20 test=# select '2001-08-20'::date

Re: [SQL] Arithmetic operation on DATE

2001-08-13 Thread Christopher Sawtell
On Mon, 13 Aug 2001 21:38, macky wrote: > is it possible to add a date datatype column to a number resulting to a > date.. chris=# select date(date(CURRENT_TIMESTAMP) + '6 @months'::interval); date 2002-02-13 (1 row) More of what you want? > theoretically it should do this

Re: [SQL] Arithmetic operation on DATE

2001-08-13 Thread Antti Linno
Ok, so here's my small knowledge on this matter select date(date('2001-08-20')+interval('6 months')); date 2002-02-20 I'm sure there's more elegant and shorter ways of doing this, but a quick answer, maybe you're stuck somewhere :) Antti Tested it on 7.0.2. On

Re: [SQL] Arithmetic operation on DATE

2001-08-13 Thread Christopher Sawtell
On Mon, 13 Aug 2001 21:48, macky wrote: > is it possible to add a date datatype column to a number resulting to a > date.. chris=# select date(CURRENT_TIMESTAMP); date 2001-08-13 (1 row) chris=# select date(CURRENT_TIMESTAMP) + '6 @days'::interval; ?column? ---

[SQL] Arithmetic operation on DATE

2001-08-13 Thread macky
is it possible to add a date datatype column to a number resulting to a date.. theoretically it should do this,,, X is in months date + X = date --> 2001-08-20 + 6 = 2002-02-20 -- The information contained in this messa

[SQL] Arithmetic operation on DATE

2001-08-13 Thread macky
is it possible to add a date datatype column to a number resulting to a date.. theoretically it should do this,,, X is in months date + X = date --> 2001-08-20 + 6 = 2002-02-20 -- The information contained in this