]> git.immae.eu Git - github/wallabag/wallabag.git/commit
Use two indexes instead of one for hashed urls
authorJeremy Benoist <jeremy.benoist@gmail.com>
Wed, 5 Jun 2019 08:51:06 +0000 (10:51 +0200)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Wed, 5 Jun 2019 08:53:15 +0000 (10:53 +0200)
commit70df4c335965a9562cc24d3ccea0a6ed1a23b7b1
treea0c398645e5d340940cf25fab9cab46eb7903e86
parentf3bfb875e94021a93e24a41fbc0f8d86d4dee378
Use two indexes instead of one for hashed urls

When using `OR` in a where clause, a composite index can't be used. We should use a `UNION` to take advantages of it.
Instead, create 2 indexes on each hashed urls and make 2 queries to find an url. It'll be faster than the previous solution.
app/DoctrineMigrations/Version20190601125843.php
src/Wallabag/CoreBundle/Entity/Entry.php
src/Wallabag/CoreBundle/Repository/EntryRepository.php
tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php