> I'm interested in doing some SQL queries from POE. Normally this
> wouldn't
> be an issue, but the queries I'm running will be taking an appreciable
> amount of time, and it would be nice to do other stuff while
> waiting for a
> reply from the server. That being said, is there a PoCo::DBI module or
> something out there that's not on CPAN? Thanks.
Ahh... the agonies of SQL.
Truthfully, it REALLY depends on your query.
I wrote a multiplexer on my fetch() loop, so I can read updated/new data and
still serve requests. THAT part was actually pretty easy, and fetching rows
is quite fast.
But the query itself was a %#!$@%. So, long days of optimization....
which led to the following solution:
Since certain parts of my data view took forever
but I only needed them at a 1-day granularity
I made views out of those slow parts
and then run a daily procedure that updates that SLOW part into a table
so that when my query runs
and mentions THAT data (that table)
it takes <.1 second on that part
instead of >30 seconds.
Depending on UR db, you can get a rundown on what parts are the slow
parts... Oracle has its EXPLAIN PLAN, dunno about others but I would be
surprised if similar wasn't available for, say, MS SQL, MySQL, Postgres.
HTH!
L8r,
Rob
#!/usr/bin/perl -w
use Disclaimer qw/:standard/;