-
From: "Kenneth Gonsalves" <[EMAIL PROTECTED]>
To: "Richard Huxton"
Cc: <[EMAIL PROTECTED]>;
Sent: Thursday, March 17, 2005 11:19 PM
Subject: Re: [SQL] Query performance problem
On Thursday 17 Mar 2005 7:35 pm, Richard Huxton wrote:
Not necessarily. NOT NUL
On Fri, 18 Mar 2005, Kenneth Gonsalves wrote:
> On Thursday 17 Mar 2005 7:35 pm, Richard Huxton wrote:
>
> > Not necessarily. NOT NULL here helps to ensure you can add values
> > together without the risk of a null result. There are plenty of
> > "amount" columns that should be not-null (total spe
DEFAULT applies to INSERTs, NOT NULL applies to UPDATEs too.
In MySQL it applies to both (ie. if you UPDATE to an invalid value, it
sets it to 'something').
NOT NULL without default is useful when you want to be sure you'll never
forget to put a value in that column, when there is no meanin
On Fri, 2005-03-18 at 10:49 +0530, Kenneth Gonsalves wrote:
> On Thursday 17 Mar 2005 7:35 pm, Richard Huxton wrote:
>
> > Not necessarily. NOT NULL here helps to ensure you can add values
> > together without the risk of a null result. There are plenty of
> > "amount" columns that should be not-n
On Thursday 17 Mar 2005 7:35 pm, Richard Huxton wrote:
> Not necessarily. NOT NULL here helps to ensure you can add values
> together without the risk of a null result. There are plenty of
> "amount" columns that should be not-null (total spent, total
> ordered etc).
that makes sense - but is it
Kenneth Gonsalves wrote:
On Thursday 17 Mar 2005 1:50 pm, Phil Daintree wrote:
CREATE TABLE chartdetails (
accountcode integer DEFAULT 0 NOT NULL,
period integer DEFAULT 0 NOT NULL,
budget double precision DEFAULT (0)::double precision NOT NULL,
actual double precision DEFAULT (0)::dou
although may be not relevant to your question, as i have noticed this
before with mysql 'sql', what is the point of having a NOT NULL field
that defaults to 0? the whole idea of a NOT NULL field is to have the
value filled in compulsorily and having a default of 0 or '' defeats
the purpose
Well i
On Thursday 17 Mar 2005 1:50 pm, Phil Daintree wrote:
> CREATE TABLE chartdetails (
> accountcode integer DEFAULT 0 NOT NULL,
> period integer DEFAULT 0 NOT NULL,
> budget double precision DEFAULT (0)::double precision NOT NULL,
> actual double precision DEFAULT (0)::double precisi
Can anyone tell me why does the following code chokes ... literally -
this
works almost invisbly under mysql - pg takes more than an hour even on a
very
small 30 record database.
- You should really use 8.0
- How much time toes it takes without the INSERT/UPDATES ?
- Please