Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1096275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:15:36+00:00 2026-05-17T00:15:36+00:00

I basically have this web page where you can narrow your search results by

  • 0

I basically have this web page where you can narrow your search results by adding and removing certain filters on the left hand side.

The content being pulled from the database is a list of properties, which can be filtered by:

  • Type ( Apartment, Camp, Ranch, Fishing Camp, Hotel, Lodge )
  • Activities ( Camping, Kayaking, Hunting )
  • Location ( Idaho, Illinois, Indiana )

So everytime I click on one of the valid filters on the left side, it adds that to the filtering criteria which is used in an ajax request. This joins the minimum number of tables necessary and returns the results.

So if I play around and activate/de-activate I can easily do around 20-30 ajax requests in about a minute ( You are only allowed to filter one of each type at a time unless you de-activate though ).

Question: I’m wondering if I should have instead pulled all the possible properties and just filtered them instead of querying the database per each ajax request, which has at least 2-3 LEFT JOINs per transaction.

There are going to be less than 100 properties, I’m not dealing with hundreds or thousands.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T00:15:36+00:00Added an answer on May 17, 2026 at 12:15 am

    Absolutely: Pull the full dataset and filter on it. Let’s say each of your Ajax requests takes 100ms. Already, you could be talking about introducing 2-3 seconds of latency into your application when, with your small dataset, you don’t really need it.

    If you’re narrowing down a list of results, “object oriented CSS” can be your friend here, too. Think of expressing the various filter-able properties as classes, and adding the user-selected filters to their parent, then using CSS to show or hide relevant results.

    For example, if you have all of your results as LIs under a parent UL, <ul class="idaho apartment"> could indicate the user filtered on all Idaho Apartment items while the following CSS would hide the others:

    .apartment .camp, .apartment ranch ... { display : none; }
    .idaho .illinois, .idaho indiana{ display: none; }
    

    With this approach, you have a single server hit and rely on the browser + JavaScript to handle the rest (and since you’re using Boolean comparisons – a result either has a property or doesn’t – it could work well for you). Regardless, even selecting nodes manually when you filter will feel snappier than sending off a request-per-filter-operation. Plus, now you’d have the ability to cache that single database query, potentially saving you a bunch of overhead if you need to run complex queries.

    Serve the full set!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, I have this webpage that is the header on any page you go
Hello I have this webiste www.liiklusinfo.ee and it's basically designed to work on web
I have this error that is keeping me from moving forward. I basically have
Basically I have this string for example $str = 'По, своей 12' I need
Basically I have this string $str=word1 word2 word3; I need array( 'word1', 'word2', 'word3'
So basically I have this giant regular expression pattern, and somewhere in the middle
Ok, so basically I have this part of the .htaccess partly working, but not
I have (basically) this code - <script type=text/javascript language=javascript> $(document).ready(function() { $(#loadDiv).load(mypage.html, function(){ alert($(#someText).text())
I have this type which is basically a struct { int x,y,z; } that
I have this script which basically toggles a bgColor class on and off so

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.