Comments (4)
Hi, adding a UNIQUE
constraint to a column will create a unique index behind the scenes. Same with PRIMARY KEY
designations. But now that you mention the indexes, I am not sure about FOREIGN KEY
columns...can you find out if they create indexes? If not, we should add them
from supertag.
I am not sure about
FOREIGN KEY
columns...can you find out if they create indexes?
They don't.
According to this reference page:
In most real systems, an index should be created on the child key columns of each foreign key constraint. The child key index does not have to be (and usually will not be) a UNIQUE index.
Cheers
from supertag.
Thanks! There should definitely be an improvement if indexes are added for the FKs. Good catch.
I will leave this issue open for a bit, since is a straightforward problem to tackle for people interested in contributing to Supertag. It will likely just involve adding a new migration file (named m1.mod
) here with the relevant schema changes
from supertag.
The queries from both link_file_to_tag()
and remove_devicefile()
would benefit from indexes on files.device
and files.inode
, i.e.
CREATE INDEX files_device_ix ON files(device);
CREATE INDEX files_inode_ix ON files(inode);
Also the queries against pins.tag_ids
don't seem to be currently optimized. By the way, I'm not sure I understood your comments around the creation of the pins table: you're mentionning using FTS5, but the code doesn't seem to actually leveraging it.
from supertag.
Related Issues (20)
- Sorting folders? HOT 3
- Provide a comparison with TMSU HOT 1
- Problem tagging multiple files with glob expansion HOT 15
- Importing directory hierarchies as tag groups HOT 13
- Error when tagging a file with spaces in filename (NotFound) HOT 1
- Unable to compile or install supertag with macFUSE 4.0.5 HOT 5
- Do not hardcode /mnt as base path for mounting. HOT 4
- Publish fuse-sys on crates.io HOT 2
- Mac build broken with latest macfuse: switch to fuser to fix mac build HOT 1
- chaining exclusions results in no files being excluded HOT 1
- Feature suggestion: default to tagging files into current collection when tag binary cwd is within that collection HOT 1
- Complement tags HOT 2
- `pdf/-plt/-math/⋂` shows pdf files with the `plt` tag
- documentation typo?
- spaces in file names
- Lints in clippy::restriction group are meant to be picked one by one HOT 1
- Unsure how to import a large number of files HOT 1
- Just wanna say thank you! I was looking for something like that for years, but wasn't brave enough to write it in C! HOT 1
- Does not work on arch linux HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from supertag.