Hi, Tobias,
Tobias Brox wrote:
How can you have a default value on a primary key?
Just declare the column with both a default value and a primary key
constraint.
It makes sense when the default value is calculated instead of a
constant, by calling a function that generates the key.
In fact,
Hi List !
I have a performance problem, but I am not sure whether it really
is a problem or not.
I am running a fresh install of PostgreSQL 8.1.4 on Windows2000.
The server is a bi-opteron with 2GB of RAM. The PostgreSQL's data
folder is on a RAID-0 array of 2 SATA WD Raptor drives (10.000
rpm,
Steinar H. Gunderson wrote:
Total runtime: 0.801 ms
0.801 ms is _far_ under a second... Where do you have the latter timing from?
I fell stupid...
Sorry for the useless message...
[]
---(end of broadcast)---
TIP 2: Don't 'kill -9'
On Oct 3, 2006, at 13:25 , Arnaud Lesauvage wrote:
The problem is that simple select queries with the primary key in
the WHERE statement take very long to run.
For example, this query returns only 7 rows and takes about 1
second to run !
SELECT * FROM table1 WHERE gid in
[Arnaud Lesauvage - Tue at 01:25:10PM +0200]
I have a performance problem, but I am not sure whether it really
is a problem or not.
QUERY PLAN
[Tobias Brox - Tue at 02:10:04PM +0200]
Did you try analyze as well? It's weird it's using seq scan, since
you have a primary key it's supposed to have an index ... though 500
rows is little.
I just checked up our own production database, takes 0.08 ms to fetch a
row by ID from one of our
Tobias Brox wrote:
Oh, the gid is not primary key. I guess I should also apologize for
adding noise here :-)
Yes, it is a primary key, but I am the noise maker here ! ;-)
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will
[Arnaud Lesauvage - Tue at 02:13:59PM +0200]
Tobias Brox wrote:
Oh, the gid is not primary key. I guess I should also apologize for
adding noise here :-)
Yes, it is a primary key, but I am the noise maker here ! ;-)
Oh - it is. How can you have a default value on a primary key? Will it
Tobias Brox wrote:
[Arnaud Lesauvage - Tue at 02:13:59PM +0200]
Tobias Brox wrote:
Oh, the gid is not primary key. I guess I should also apologize for
adding noise here :-)
Yes, it is a primary key, but I am the noise maker here ! ;-)
Oh - it is. How can you have a default value on a
Tobias Brox tobias 'at' nordicbet.com writes:
Oh - it is. How can you have a default value on a primary key? Will it
you can but it is useless :)
foo=# create table bar (uid int primary key default 0, baz text);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index bar_pkey for
On October 3, 2006 04:25 am, Arnaud Lesauvage wrote:
Hi List !
I have a performance problem, but I am not sure whether it really
is a problem or not.
I am running a fresh install of PostgreSQL 8.1.4 on Windows2000.
The server is a bi-opteron with 2GB of RAM. The PostgreSQL's data
folder is
On October 3, 2006 05:08 am, Alexander Staubo wrote:
On Oct 3, 2006, at 13:25 , Arnaud Lesauvage wrote:
The problem is that simple select queries with the primary key in
the WHERE statement take very long to run.
For example, this query returns only 7 rows and takes about 1
second to run
12 matches
Mail list logo