~mdw
/
odin-cgi
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
697afe0
)
sql/setup-shorturl.sql: Add index by (url, owner).
author
Mark Wooding
<mdw@distorted.org.uk>
Sat, 4 Jul 2015 17:02:40 +0000
(18:02 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sat, 4 Jul 2015 17:02:40 +0000
(18:02 +0100)
When we're trying to create a new entry, we search for an existing entry
for the same URL and a similar owner. The index means we avoid having
to do a full scan of the table for this.
sql/setup-shorturl.sql
patch
|
blob
|
blame
|
history
diff --git
a/sql/setup-shorturl.sql
b/sql/setup-shorturl.sql
index
3b20463
..
eaddf90
100644
(file)
--- a/
sql/setup-shorturl.sql
+++ b/
sql/setup-shorturl.sql
@@
-21,5
+21,6
@@
create table odin_shorturl
owner varchar(64) not null,
url text not null);
create index odin_shorturl_by_owner on odin_shorturl (owner);
+create index odin_shorturl_by_url_owner on odin_shorturl (url, owner);
commit;