On Mar 24, 2005, at 1:11 PM, Edmund Bacon wrote:

Sean Davis wrote:

Thanks. I thought about that a bit and it seems like it is highly likely to be expensive for a single query (though I should probably try it at some point). If I do find myself reformatting results after response to user input (i.e., reusing the query), though, then your solution is likely to be very useful.



Note that the subselect version takes about 10 times as long as the temptable version, and does not seem to be dependent on what data might be cached.


Nice. Thanks for doing my work for me! I guess I will have to think about it more seriously.


It could be a slight bit complicated because my code is running under mod_perl, so connections are cached. As I understand it, the temp table will stick around, so I will have to be careful to explicitly drop it if I don't want it to persist? Also each table will need a unique name (I have a session_id I can use), as it is possible that multiple temp tables will exist and be visible to each other?


Thanks again, Sean


---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to