View Single Post
  #4  
Old 18th June 2023, 14:56
Subzero's Avatar
Subzero Subzero is offline
Coder
 
Join Date: Jul 2008
P2P
Posts: 190
Default
If you want to remove the join you could change it to a sub query although if it’s faster or not depends on a lot of factors, the main benefit is it filters out a lot of the data removing much of the overhead but you’d have to run benchmarks to determine if it’s faster in this case.

Example:

PHP Code:
 SELECT COUNT(*) FROM torrents WHERE category IN (SELECT id FROM categories $where
This is just off the cuff so might not work straight out the box I’ve not used torrent trader in a few years.
Reply With Quote