Quantcast
Channel: SQL: Remove rows whose associations are broken (orphaned data) - Stack Overflow
Viewing all articles
Browse latest Browse all 6

Answer by user753676 for SQL: Remove rows whose associations are broken (orphaned data)

$
0
0

think there is no faster solution when there are so many rowsthat are on your server 157 rows per second

check user id if mysql num rows = 0 than delete the downloads and also check the item_id

there was also a similar question about the performance of myswl num rows

MySQL: Fastest way to count number of rows

edit: think the best is to creatse some triggers so the database server does the job for you

currently i would use a cronjob for the first time


Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>