[mythtv-users] Hey all

Johannes Niess linux at johannes-niess.de
Mon Mar 1 18:18:58 EST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Montag, 1. März 2004 19:35 schrieb thor:
> On Monday 01 March 2004 12:46, Johannes Niess wrote:
> > I suspect inefficient use/not use of mysql. My default playlist is
> > just short of 600 entries, but it takes about 4 seconds on a P4 to
> > parse the song list.
>
> 	It always loads all of your metadata into memory, the playlist mapping
> happens afterwards in code, not queries.

So mythmusic does a "Select * from musicmetadata", parses it and picks the 
playlist entries from that?

Databases are made for that. I'm sure you code can't beat mysql.

>
> > That way mysql has the burden of figuring out playlists, but that is
> > what databases are made for.
>
> 	And playlists within playlists (ie. negative entries on playlist
> lists)?

Now you are talking about generation of new playlists?

If you mean unions of playlists:
Select distinct song.id ... where playlist.id = 1 or playlist = 2;

If you mean temporarily disabling entries: Add a bool field to the cross table

If you want e. g. to exclude a particullary bad album from an artist playlist: 
use a temporary table for the positive selection and delete some entries.

The pseudo-random selection mode is my favorite :-)

Johannes Nieß

P. S: I'm not proposing a rewrite of mythmusic, but do you know Class::DBI?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAQ8TjZ86b9aw2E+0RAjFpAJ4jyUjiiweszU3bnQMZ1OA9lISmcACgl7CP
5m+M45J2uqpo/MQJoIDvb8c=
=xQjG
-----END PGP SIGNATURE-----


More information about the mythtv-users mailing list