View Issue Details

IDProjectCategoryView StatusLast Update
0003933MMW v4DB/FileMonitorpublic2007-11-13 22:38
Reporterjiri Assigned To 
PriorityurgentSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version3.0 
Fixed in Version3.0 
Summary0003933: Improve some SQL queries
DescriptionOne user pointed out that some queries could be improved. By his own words:

Oh and another thing, I noticed that the SQL used to populate the main window when browsing various nodes aren't consistent/tuned properly. E.g. adding song from a genre node uses this sql:

SELECT Songs.*
FROM Songs
WHERE exists (SELECT NULL FROM GenresSongs WHERE GenresSongs.IDSong=Songs.ID AND GenresSongs.IDGenre=?)

When this is at least ten times faster:

SELECT Songs.*
FROM Songs
WHERE ID IN (SELECT IDSong FROM GenresSongs WHERE GenresSongs.IDGenre=?)
TagsNo tags attached.
Fixed in build1100

Activities

jiri

2007-11-09 11:54

administrator   ~0011848

We could change this and make sure there aren't any such suboptimal queries.

Ludek

2007-11-09 14:45

developer   ~0011850

Last edited: 2007-11-09 14:46

It is true. It is at least ten times faster:

So I fixed it across the product for GenresSongs, ArtistsSongs, ListSongs, PodcastEpisodes tables in order to be faster.

i.e. Queries which consists of these tables are much faster now
+ the original query for adding songs from a genre node is much faster now.

Fixed in build 1100.

rusty

2007-11-13 22:38

administrator   ~0012003

Verified no regressions in 1104.