GDA: empty PostgreSQL table failed workaround

Mark Johnson mrj001 at shaw.ca
Wed Feb 13 15:31:10 EST 2008


Phil Longstaff wrote:
> The slot_id is used to provide a unique primary key.  I don't know if it 
> would work to have the slots table have *no* key, but have an index on 
> the obj_guid field.  The obj_guid field can't be the primary key because 
> I believe a primary key needs to be unique.  Mark?
>
>   
Yes, a primary key does have to be unique.  I can't think of any 
requirement that a table have a primary key though.  It is generally 
good practice.  You could have an index on the guid field.

In my benchmarking, I was thinking I might create such an index to see 
if it helped.  I haven't got that far though.  I will be posting my 
results so far (i.e. without any additional indices) soon (hopefully 
later today).  Obviously, they can't include the complete series of 
queries for PostgreSQL.  I have done MySql and SQLite, but need to run 
the partial series for PostgreSQL.

Mark


More information about the gnucash-devel mailing list