Question

it take about 6898 ms to load data.

SELECT thumbnail_link, description, link, embed_html, title, created_time, owner, vid FROM video WHERE owner = 477934732233267 OR owner = 350544878418504 OR owner = 534680473216081 OR owner = 539004829516696 OR owner = 663513950371958 OR owner = 426622064081752 OR owner = 289025427915372 OR owner = 382955545140493 ORDER BY created_time DESC LIMIT 20 OFFSET 0

No correct solution

OTHER TIPS

You could speed this up a little bit by using an IN-list instead of ORs, but still over 5 secs:

SELECT thumbnail_link, description, link, embed_html, title, created_time, owner, vid FROM video WHERE owner in (477934732233267, 350544878418504, 534680473216081, 539004829516696, 663513950371958, 426622064081752, 289025427915372, 382955545140493) ORDER BY created_time DESC LIMIT 20

I suspected the sort to be time-consuming, but removing the ORDER BY doesn't have a big impact. So, I think you'll have to live with the response times.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top