View Issue Details

IDProjectCategoryView StatusLast Update
0003976MMW v4Playlist / Searchpublic2007-11-26 22:39
ReporterLudek Assigned To 
PriorityimmediateSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version3.0 
Fixed in Version3.0 
Summary0003976: Some SQL queries optimized in RC2 are not optimal in some cases / situations
DescriptionIn 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 !

TagsNo tags attached.
Fixed in build1107

Activities

Ludek

2007-11-19 01:26

developer   ~0012059

Fixed in build 1107.

rusty

2007-11-26 22:39

administrator   ~0012174

Verified 1108 (that queries work and that there are no major performance degradations).

rusty

2007-11-26 22:39

administrator   ~0012175

Verified 1108 (that queries work and that there are no major performance degradations).