aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArne Georg Gleditsch <argggh@lxr.linpro.no>2007-11-29 09:44:58 +0100
committerArne Georg Gleditsch <argggh@lxr.linpro.no>2007-11-29 09:44:58 +0100
commit04b972005468db794529a732b764306c6d70fe97 (patch)
treea6d5bc250c75094a2bc1c4eed7f6f882c1b33237
parentfae4c016ebca5bc4a65d17e685f811b35f4738ab (diff)
Sacrifice database integrity constraints for performance. The lxr datastore is mostly write-once as far as the individual tuples are concerned, and the foreign key reference can really hurt performance on large bulk insertions into big tables.
-rw-r--r--lib/LXRng/Index/Pg.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/LXRng/Index/Pg.pm b/lib/LXRng/Index/Pg.pm
index 7afb2a8..817d4c3 100644
--- a/lib/LXRng/Index/Pg.pm
+++ b/lib/LXRng/Index/Pg.pm
@@ -118,8 +118,8 @@ sub init_db {
$dbh->do(qq{
create table ${pre}filereleases
(
- id_rfile int references ${pre}revisions(id),
- id_release int references ${pre}releases(id),
+ id_rfile int,
+ id_release int,
primary key (id_rfile, id_release)
)
}) or die($dbh->errstr);