summaryrefslogtreecommitdiff
path: root/util/sqleditfunc.pl
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2022-06-16 12:22:37 +0200
committerYorhel <git@yorhel.nl>2022-06-16 12:22:38 +0200
commit5acdb6f9ea915c50e0a6c5614154641bb8395574 (patch)
tree6fbe33cecb5b37cd4eb9af7f2297c665ebe0762d /util/sqleditfunc.pl
parent71e64128607a2dde65a73584d07bbbbdd92a1760 (diff)
Debloat users table my moving some columns to other tables
This reduces the average row size from 145.7 to 101.4 bytes (including row headers). Probably not going to result in a noticeable performance difference, but the table is referenced pretty often while many columns are only ever read by direct id lookup. I could reduce the size even further, but that'll get into diminishing returns territory. This split makes it easier to add more preferences later on without having to worry about performance. Also improved user privacy a bit by moving the 'ip' field to a write-only column in users_shadow, and deleted the unused changes.ip column while I was at it.
Diffstat (limited to 'util/sqleditfunc.pl')
-rwxr-xr-xutil/sqleditfunc.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/sqleditfunc.pl b/util/sqleditfunc.pl
index e18adde4..41e292b7 100755
--- a/util/sqleditfunc.pl
+++ b/util/sqleditfunc.pl
@@ -96,8 +96,8 @@ BEGIN
INSERT INTO {item} DEFAULT VALUES RETURNING id INTO nitemid;
END IF;
-- insert change
- INSERT INTO changes (itemid, rev, requester, ip, comments, ihid, ilock)
- SELECT nitemid, nrev, requester, ip, comments, ihid, ilock FROM edit_revision RETURNING id INTO nchid;
+ INSERT INTO changes (itemid, rev, requester, comments, ihid, ilock)
+ SELECT nitemid, nrev, requester, comments, ihid, ilock FROM edit_revision RETURNING id INTO nchid;
-- insert data
{copyfromtemp}
{copymainfromtemp}