Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

queries per page?

monstomonsto
edited July 2008 in Vanilla 1.0 Help
on a base install (no plugins) how many queries can i expect to me made per page?

if there is no answer for that, where is the main db abstraction function that makes the queries? i'm pretty sure i can poke a counter in.

i'm curious cuz i want to put in vanilla forum, but my existing server setup gets pretty saturated at peak as it is and i dont watn to make it any worse.

Comments

  • Options
    /library/Framework/Framework.Mysql.php contains the abstraction, and the pages typically run fewer than four queries--one to check if you are logged in and active account, and one to three more for querying the discussions page or a comment page.

    There is a cache extension out there also that would further reduce database queries.
  • Options
    excellent answer thanks. any truth to the rumors that it bogs really badly on long threads? or is that a product of certain (or multiple) extensions? (only thing i'll likely run is a handful of front end extensions -- the bbcode plugin for example -- and certainly nothin like whos on or profile extenders.)
  • Options
    Only certain extensions. Discussion overview is known to bog down the main page if you have many categories (repeats one of the most complex queries for each category) but each comment thread is normally a single query.

    The SQL builder is an excellent tool to reduce extension queries since it manipulates queries that normally execute anyway, to retrieve the extra data that is needed by the extension.

    One of my extensions used to run a query for each comment in a thread, but I rewrote that out of it a long time ago. My Comment Links is known to bog down as it searches for a comment in a long thread, but that only happens when following one of the comment links, and will be fixed in its next version (coming when its done).

    There is also a file (search for debug.php) that you can use to show you as an administrator all the queries that run on a page, so you can quickly see what extra stuff a extension may be running.
  • Options
    that's exactly what i need right there. thanks wallphone. you're humble and lovable.
  • Options
    ** and knowledgeable

    you can't have left that one out; my goodness! ;-{!P (wink, mustache,foot in [monsto's] mouth, tongue out)
  • Options
    I'm interested on the debug.php stuff, but I seem to be unable to find it, could you explain it in more detail?

    Thanks
  • Options
    Ah, how to install/use it would be here: Searching with UTF-8 Character Set # 11.
  • Options
    there is a problem with the debugger when having custom database prefix.

    the problem is that after including the database configuration (conf/database.php, usually) it includes the appg/database.php so any custom setting in the database is lost, giving an error when trying to start the admin's session

    the easiest workaround is to move the include($Configuration["DATABASE_PATH"]); just under the include($Configuration["APPLICATION_PATH"]."appg/database.php");around line 17

    for the moment it seems to work this way ;)
  • Options
    Good find, I'll add it to the bug tracker so it's fixed for the next Vanilla version.
  • Options
    Actually, since this file is not included in Vanilla anymore, there really isn't any file to fix.
This discussion has been closed.