[mythtv-users] Duplicate detection
Jan Ceuleers
jan.ceuleers at gmail.com
Sat Oct 1 10:51:49 UTC 2016
On 20/09/16 18:20, Michael T. Dean wrote:
> Totally not tested, but something along the lines of:
>
> LEFT OUTER JOIN oldrecorded ON (oldrecorded.title = program.title AND
> oldrecorded.subtitle = program.subtitle AND oldrecorded.recstatus IN
> (-3, 11))
> ...
> (your custom query stuff)
> AND oldrecorded.recstatus IS NULL
>
> and anything you can do to further limit the join (conditions in the ON
> clause) will improve performance.
Been playing around with this. Implementing it is hampered by a length
restriction on the subtitle column in the record table:
mysql> show columns from record where Field="subtitle";
+----------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------+--------------+------+-----+---------+-------+
| subtitle | varchar(128) | NO | | | |
+----------+--------------+------+-----+---------+-------+
1 row in set (0.00 sec)
I'll mull it over some more. Perhaps I can move the subtitle check to
the WHERE clause, or even drop it altogether.
More information about the mythtv-users
mailing list