• pradg

    (@pradg)


    I am planning to build a site which will probably end up with thousands of posts. At the bottom of every blog post or article, I will be using na AQL block (either specifying a particular category or to query all the categories) and using the “Random” option.

    Now using the Random option and querying the entire DB might be expensive. But I am unable to find any information on this on what will be the impact. Let’s say I have 10k articles/blogposts and I use the Random sorting option in every AQL block on every post, what is the impact on the DB and on Response Times? Will a call be made to the DB every time a user accesses an article/blogpost? Can any caching mechanism be implemented to minimise DB calls yet keep the Random sorting option?

    Thanks.

Viewing 1 replies (of 1 total)
  • Plugin Author Ryan Welcher

    (@welcher)

    Hello and thanks for using AQL!

    The Random option is indeed a more expensive way of ordering posts. You will need to be careful with the queries you are building with it. There is a Disable Pagination control that adds 'no_found_rows' => true to the query that might be helpful but that will kill any pagination would like to display.

    I am going to close this out as a non-support question but I would encourage you to looking into caching strategies and tools for your site that will help you to operate at the scale you’re talking about.

    Best of luck!

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.