[mythtv] Joining on a calculated column

mythtv at donoghue.org mythtv at donoghue.org
Tue Jan 11 12:17:35 EST 2005


>> AFAIK, yes. User functions are only in the MySQL 5.x development. With
>> MySQL 4.1, you could use a sub-select to create a virtual table with the
>> calculation done once. With 3.x and 4.0, I think you're stuck doing it
>> the long way.
>
> Or you could create a temporary table in a separate query (as long as
> you have permission to do so).  Works nicely for some things, but beware
> of speed issues (mysql's optimizer might do this for your
> repeated-calculation thing, anyway).
>
> -Chris

Yep, if its a complex formula, then a temp table would be the way to go. 
Permissions shouldnt be an issue as long as you preface the temp table
with a "#"




More information about the mythtv-dev mailing list