[PD] pyext + pygresql vs sqlsingle
ix at replic.net
Mon Nov 7 20:47:12 CET 2005
On Mon, Nov 07, 2005 at 07:30:28PM +0000, Jamie Bullock wrote:
> Dear list,
> I need to insert around 5 sets of 40 values, per second from PD into a
> postgresql database (both on the same machine). I can see two options -
> pyext + pygresql or sqlsingle.
> >From a brief glance at both it looks like the Python route would be
> better because sqlsingle introduces a lot of overhead
and so does python. why not just open up a pipe (once per session) to the daemon and stream the commands over plaintext. ive not used postgres but mysql has something similar, you just terminate the message with a ";" same as pd..
> opening and
> closing the connection, and vacuuming the db between writes.
> However, perhaps sqlsingle could handle the task on a modern machine
> (Centrino 1.6GHz)? This would probably save me some time getting the
> Python stuff working? Does anyone have any advice either way before I
> start with this?
if youre generating a lot of symbols from the patch, to use as text for queries, youre going to incur ram leakage, due to the fact that PD has no 'string' type, just a never-deallocated symbol table..
depending on how simple your database needs are, maybe you can use Pool or PDContainer instead...although theyre certainly a bit less flexible in terms of select-statement-esque things they can do the basics like retrieve via ID, next/prev, all, 'namespaces' etc..
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
More information about the Pd-list