FireFly Media Server › Firefly Media Server Forums › Firefly Media Server › General Discussion › ‘idx’ and ‘disable’ fields in database › Reply To: ‘idx’ and ‘disable’ fields in database
13/04/2007 at 11:33 AM
#10053
fizze
Participant
ad b.)
Each (proper) database needs an primary key, for firefly’s song-db this is the field called “idx”.
One index uniquely identifies an mp3.
Normally, this is linked to a sequence, so that any inserts should youse NEXTVAL (or similiar) from that sequence to populate the songs.idx field.
Also, and index greatly increases performance on said fields.
A
select * from songs where idx=1232;
doesnt do a full table scan, for instance 😉