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 8903169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:48:11+00:00 2026-06-15T01:48:11+00:00

I have a big database to get dynamically images from Ajax response. How could

  • 0

I have a big database to get dynamically images from Ajax response.
How could i make it lightning fast

images is in comma separated form such as

img4.jpg, img3.jpg, img5.jpg, img7.jpg,img11.jpg, img1.jpg, img2.jpg, img3.jpg, img6.jpg, img8.jpg

my code for php.

function childImgsGrid(){

        $parentImgId = $_POST['parentImgId'];

        $query = mysql_query("select child_imgs_id,child_imgs from parent where parent_img_id = $parentImgId") 
                or die(mysql_error());

        $result = mysql_fetch_array($query);
        $arrayOfImages = explode(",", $result['child_imgs']);
        $i=1;
        foreach($arrayOfImages as $nameOfImage){

            echo "<li><a href='#lookbook' ><div class='view'><img src='images/slide/".$nameOfImage."'></a></li>";

        }
    }

and for Ajax

var parentImgId = $anchor.attr("id");

                var dataString = 'queryString=childImgsGrid'+'&parentImgId='+parentImgId; 

                var arrayOfImages = new Array();

                $glob.ajax({
                    type: "POST",
                    url: "ajaxtemplate.php",
                    data: dataString,                   
                    cache: false,
                    success: function(response) {
                        $glob('#grid').html(response);
                    }
                });
  • 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-06-15T01:48:12+00:00Added an answer on June 15, 2026 at 1:48 am

    This is very broad topic in general but I’ll attempt to throw some light on the matter.

    1. Optimized versions of Images

      Like Facebook, when images are added you can use a background job to create a low-quality version of the image. When the image is requested, this low-quality image is show while the original high quality image is loaded in the background. Once done loading, just replace.

    2. Pre-loading

      If you know or have an idea of what images will need to be shown (common case in galleries to pre-load the next 2 or 3 images) you can fetch them without user input. So when a user opens image #443 you load it along with #444, #445 in the background.

    3. Using in-memory stores

      If the database records are very large, and presuming you are saving images in the filesystem not as blobs in the DB, and the retrival is based on a unique key (primary or otherwise) you can implement something like memcache or redis so that the quering is very fast.

    4. Node.js

      If the number of requests for images is becoming very high, think about using an asynchronous server response architecture like node.js.

    The particular use-case as well as technologies will change the implementation of each of the above but the overall concepts should be solid.

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

Sidebar

Related Questions

I have a big database result set and I want get specific rows from
I have a big table in my database with a lot of words from
I have SQL Server 2008 Ent and OLTP database with two big tables. How
I have big system that make my system crash hard. When I boot up,
I have a big database (~4GB), with 2 large tables (~3M records) having ~180K
I have this big function (1300+ lines of code) that takes data from the
Hi I have one big problem with one MYSQL search. My database TABLE looks
I have a big SQL Server database I want to connect to and my
I have got a big trouble in my Xml generator using C#. I could
I have big database full of information and I use the following Query to

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.