[mb-devel] Using NGS live feed in CTDB
Gregory Chudov
gchudov at gmail.com
Fri May 20 20:29:26 UTC 2011
Greetings.
2011/5/21 Lukáš Lalinský <lalinsky at gmail.com>
>
> MusicBrainz never uses the CD TOC directly for searching. It either
> uses the DiscID for exact matches (which is really just a SHA-1 hash
> of the CD TOC) or it uses the tracklist_index table which contains a
> multi-dimensional index that can be used for fuzzy searches:
I was using DiscID search too.
Here's a quote from lib/MusicBrainz/Server/Data/MediumCDTOC.pm
find_by_discid:
SELECT medium_cdtoc.id, medium, cdtoc, edits_pending FROM medium_cdtoc
JOIN cdtoc ON cdtoc = cdtoc.id
WHERE discid = ?
ORDER BY medium_cdtoc.id ASC'
This function is used by lib/MusicBrainz/Server/Controller/WS/2/DiscID.pm.
This search caused sequential scan of medium_cdtoc table due to
missing index on medium_cdtoc.cdtoc.
Thanks again.
More information about the MusicBrainz-devel
mailing list