View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003976 | MMW v4 | Playlist / Search | public | 2007-11-18 23:23 | 2007-11-26 22:39 |
Reporter | Ludek | Assigned To | |||
Priority | immediate | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 3.0 | ||||
Fixed in Version | 3.0 | ||||
Summary | 0003976: Some SQL queries optimized in RC2 are not optimal in some cases / situations | ||||
Description | In the RC2 there were optimized some queries in the manner of 0003933. e.g. There were optimized queries like this one (form A) SELECT Songs.* FROM Songs WHERE exists (SELECT NULL FROM GenresSongs WHERE GenresSongs.IDSong=Songs.ID AND GenresSongs.IDGenre=?) to the form B: SELECT Songs.* FROM Songs WHERE ID IN (SELECT IDSong FROM GenresSongs WHERE GenresSongs.IDGenre=?) The true is that the form B is at least ten times faster if you use it for searching a bigger set of tracks (e.g. showing all tracks of the selected genre node), but if you use it for finding whether a single track satisfies the (genre) criteria then the form A is hundred times faster. i.e. In such a cases the query should look like SELECT Songs.* FROM Songs WHERE Songs.ID = ? and exists (SELECT NULL FROM GenresSongs WHERE GenresSongs.IDSong=Songs.ID AND GenresSongs.IDGenre=?) and should be of the form A ! | ||||
Tags | No tags attached. | ||||
Fixed in build | 1107 | ||||