Results 81 to 90 of 107
Thread: Building Playlists
-
2008-05-19, 23:30 #81Member
- Join Date
- Feb 2007
- Posts
- 61
-
2008-05-20, 00:39 #82
Building Playlists
You could try my plugin "PlaylistMan", which allows a song in the now playing playlist to be added to the end of another playlist. The way this is done is much quicker than loading the playlist, adding a song to it and then saving it again.
http://www.hergest.demon.co.uk/Music/music.shtml
-
2008-05-20, 11:50 #83Senior Member
- Join Date
- Apr 2005
- Location
- Buckinghamshire, England
- Posts
- 9,983
7,500 inserts on an indexed table on a PC might take a while...
On the other hand, all main queries need to be index-covered so you only read the index, not the data, wherever possible.
There is a read/write trade-off here, but since a database is (usually) write once, read many times, its best to invest the performance in the read rather than the write (at least in this application - unlike say a shopping cart, or airline system...)
I get annoyed by the length of time a scan takes (even with 7.x which is much faster than before)...but actually its the read performance that drives the user experience.
I don't get why it takes 60 mins to do 30k updates. I can't help wondering if the old trick of dropping all indexes, rescanning and then re-adding the indexes back at the end (obviously only for a clear & rescan!) would improve matters.
Doing updates to a table with a physically-clustered index is always slow...
Also, is it just me (I don't use playlists at all) but isn't 7.5k a bit BIG for a playlist?You want to see the signal path BEFORE it gets onto a CD/vinyl...it ain't what you'd call minimal...
Touch(wired/W7)+Teddy Pardo PSU - Audiolense 3.3/2.0+INGUZ DRC - MF M1 DAC - Linn 5103 - full Aktiv 5.1 system (6x LK140's, ESPEK/TRIKAN/KATAN/SEIZMIK 10.5), Pekin Tuner, Townsend Supertweeters,VdH Toslink,Kimber 8TC Speaker & Chord Signature Plus Interconnect cables
Stax4070+SRM7/II phones
Kitchen Boom, Outdoors: SB Radio, Harmony One remote for everything.
-
2008-05-20, 12:08 #84Member
- Join Date
- Feb 2007
- Posts
- 61
I totally agree with all that you say about the Read/Write tradeoff. I've downloaded MySQL to my Mac and I'm currently experimenting with a few interesting combinations. I also found that the many-to-many records have Foreign Keys (with CASCADE ON DELETE) on them, which could be affecting things. I realise that this is a case of making the database fit the code - which is the wrong way round - but I don't want to instigate any code changes at the moment until I've proved the principle.
As for the size of my playlists, there shouldn't be a limit on such things (iTunes doesn't have one and it handles them instantly). I just have very eclectic taste and I enjoy the element of surprise!
More news later when I've finished the tests I'm currently running.
-
2008-05-20, 12:16 #85Senior Member
- Join Date
- Apr 2005
- Location
- Buckinghamshire, England
- Posts
- 9,983
Hi there - please ignore my comment about playlists as I don't use them...but I do design very large (>10Tb) commercial databases for a living!
(OK so they don't use MySQL...but the general principles tend to apply!)
That "cascade on delete" looks worrying
) - also, what are these m:m relationships? - they tend to not work at all! (I'm a third-normal form type of guy
) )
You want to see the signal path BEFORE it gets onto a CD/vinyl...it ain't what you'd call minimal...
Touch(wired/W7)+Teddy Pardo PSU - Audiolense 3.3/2.0+INGUZ DRC - MF M1 DAC - Linn 5103 - full Aktiv 5.1 system (6x LK140's, ESPEK/TRIKAN/KATAN/SEIZMIK 10.5), Pekin Tuner, Townsend Supertweeters,VdH Toslink,Kimber 8TC Speaker & Chord Signature Plus Interconnect cables
Stax4070+SRM7/II phones
Kitchen Boom, Outdoors: SB Radio, Harmony One remote for everything.
-
2008-05-20, 12:26 #86Member
- Join Date
- Feb 2007
- Posts
- 61
I'm a Mainframe DBA, so that's how my interest in this came about. I must admit, I'd never touched MySQL until today but, as you say, the same principles apply.
The thing about this whole design that gets me is the use of the many-to-many's - especially with the RI turned on so aggressively. I'll keep you posted about any results. Currently, in the absence of any programme information but based solely on the SQL logs, I've removed the RI and Indexed the affected tables up to the eyeballs! The initial results are encouraging, despite the slightly less han scientific methodology.
-
2008-05-20, 12:40 #87Senior Member
- Join Date
- Apr 2005
- Location
- Buckinghamshire, England
- Posts
- 9,983
Hmmm m:m+RI... does not compute, Captain!
Surely those m:m's have got to go (I know that means redesigning the tables/indexes/keys but even so...)
Also - as I'm sure you know - RI only makes sense for 3rd+ normal form.
Anyway, I'm sure you know exactly what you are doing!
RI is really there (at least in this application) to cascade the deletes...but on a clear/re-scan you are in a database truncate situation...
RI won't help you there. Also (unless I'm missing something) RI is used to enforce parent-child (1:m) integrity for inserts...I'm thinking manual data entry here). In a "batch" situation, you can force all the parents in first (sorry - starting to ramble now - it's been a long day at the office)You want to see the signal path BEFORE it gets onto a CD/vinyl...it ain't what you'd call minimal...
Touch(wired/W7)+Teddy Pardo PSU - Audiolense 3.3/2.0+INGUZ DRC - MF M1 DAC - Linn 5103 - full Aktiv 5.1 system (6x LK140's, ESPEK/TRIKAN/KATAN/SEIZMIK 10.5), Pekin Tuner, Townsend Supertweeters,VdH Toslink,Kimber 8TC Speaker & Chord Signature Plus Interconnect cables
Stax4070+SRM7/II phones
Kitchen Boom, Outdoors: SB Radio, Harmony One remote for everything.
-
2008-05-20, 12:48 #88Member
- Join Date
- Feb 2007
- Posts
- 61
Exactly! The m:m's plus the RI is not at all sensible. However, as I said, without access to the code, I'm in a position of trying to make the DB fit the code (tail wagging the dog?). The use of RI is ridiculous here because, as you said earlier, the only time the DB is written to is when scanning or compiling a playlist. Any checks on parentage would be done naturally in the code there. In fact, now I've removed it, it doesn't seem to have affected functionality at all (no surprise there).
I've been ranting on about the feeling I've had about the database for some time now and it's nice to have some confirmation that this is an avenue worth pursuing.
It would be much more worthwhile if the code could be changed to fit a more sensible design, though.
-
2008-05-20, 13:03 #89
-
2008-05-20, 13:08 #90Member
- Join Date
- Feb 2007
- Posts
- 61
Can you let me know where it is, please?


Reply With Quote
