WordPress.org

Ready to get started?Download WordPress

Forums

how to reduce queries? (18 posts)

  1. Anonymous
    Unregistered
    Posted 10 years ago #

    Hi, I wonder is there any way I can lower my queries ( currently now is 23 )... I hope to reduce to 8 - 14 queries...
    thanks.

  2. welsper
    Member
    Posted 10 years ago #

    Start chopping off stuff like the calender, links, etc and disable plugins until you get what you want.

  3. Beel
    Member
    Posted 10 years ago #

    I doubt you can do that - WP itself probably has about 18-20 queries out of the box.

  4. davidchait
    Member
    Posted 10 years ago #

    You can certainly chop stuff off, and there are certain optimizations/caching that may still not have made it into a release. CHAITGEAR is at around 18 queries on the homepage (probably 1-3 less, since I get extra stuff when logged in). But I've done a ton of customization, and only use what I really need.
    You could probably strip down pretty barebones and get it to a dozen. I wouldn't expect much less than that, and every plugin/feature will add one or two apiece, minimally... ;)
    -d

  5. hooopla
    Member
    Posted 9 years ago #

    On my test site I've just added a plug-in that does something I really like. But the number of queries on my home page has risen from 23 to 48. There isn't a difference in render time, however.

    Since I'm concerned about render time as my site grows larger, is this increase in the numer of queries a warning sign?

  6. tdw
    Member
    Posted 9 years ago #

    Running lots of queries is not neccessarily a bad thing - if you need to run them. It depends on the query. What is bad is repeating the same (or similar) queries when you don't need to.

    I'd be concerned with a plugin that needs more queries than the rest of my installation to run -- chances are that WP has most of the info on hand already. What is the plugin?

  7. techwench
    Member
    Posted 9 years ago #

    The plugin is Multiple Random Images. When the options page was added, the path to the directory/images, max number of images, and image sizes were added to the db.

    The plugin used to not have that options page, and didn't do anything but fopen, but...uh...other people thought it was too difficult to configure.

  8. Sysy
    Member
    Posted 9 years ago #

    Hi all, is there anyone who's willing to help me? I'm trying to install wordpress, but i get errors about my database. I'm trying to make a new topic, but i don't see how??

  9. Sysy
    Member
    Posted 9 years ago #

    ehm...this is the error i get:

    Can’t select database
    We were able to connect to the database server (which means your username and password is okay) but not able to select the janet-planet_net_-_syte database.

    ?? i'm puzzled and new to this stuff. Anyone willing to help please message me on msn janetplanetsite@hotmail.com ;) thanks!!

  10. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Sysy - on the main page:
    http://wordpress.org/support/
    scroll to the bottom
    Click the Troubleshooting forum
    Scroll to the bottom
    Make new post :)

  11. Sysy
    Member
    Posted 9 years ago #

    aah ok thank you! lol

  12. hooopla
    Member
    Posted 9 years ago #

    It's the multiple-random-img plugin . It does something no other plugin I've found does, and I'm really hopeful that I can use it on my production site.

    There's two odd things going on here.

    Even if I reduce the number of random images being displayed from 5 (default) to 1, the number of queries stays at 48.

    The author's page on which this plugin is used is only using 20 queries! It's showing a sidebar with categories, archives, etc., so I don't think it's a static page.

  13. hooopla
    Member
    Posted 9 years ago #

    The plugin is Multiple Random Images. When the options page was added, the path to the directory/images, max number of images, and image sizes were added to the db.

    Oh, the interconnectedness of it all! (I'm guessing, techwench, that you're the author of this fine plugin.)

    When tdw says, "Running lots of queries is not neccessarily a bad thing - if you need to run them. It depends on the query," does that apply in this case?

    Is there an earlier version available that doesn't use the database or should I just shut up and enjoy the plugin? ;-)

  14. Sysy
    Member
    Posted 9 years ago #

    podz are you on msn?

  15. techwench
    Member
    Posted 9 years ago #

    hooopla, yeah, it's me. But shhhh, okay? I'm incognito! ;)

    In this case, it's rerunning the queries, because it's having to increment the number in the array, so that it doesn't select the same image. And I know I'm probably not making much sense (not even to myself)...but bottom line: I don't know how to make it not rerun the queries because of that array.

    Anyway, I'll see if I have an older version around.

  16. hooopla
    Member
    Posted 9 years ago #

    Thank you, techwench. You must get that, "why can't people just be satisfied" feeling about my question. The truth is I think that's an awesome plugin and I'm putting my own desire to use it above civility. ;-)

  17. techwench
    Member
    Posted 9 years ago #

    hooopla, I sent you an email with an older version of the plugin.

    At least I think it was you. You're the same person that commented on the plugin page, right? ;)

  18. hooopla
    Member
    Posted 9 years ago #

    Yes, that was me. Thank you again for taking the trouble to respond. I've added the older version to my page and it's working perfectly. I am a happy guy. ;-)

Topic Closed

This topic has been closed to new replies.

About this Topic