Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - up23

Pages: [1]
1
Does anyone know how to make it so that the search bar that appears on everypage only searches the image names/title and keywords instead of everything? I only want the advanced search to search description.

Also, does anyone know how to take out words in the search string? The common words like "the" or "of" or "to" I want not to search for.

Thanks.

2
I've been kind of stress testing 4images, and I've noticed that (with the cache turned on) the mysql query that takes the most time (>70%) is the lines:

Code: [Select]
  $sql = "SELECT cat_id, COUNT(*) AS num_images
          FROM ".IMAGES_TABLE."
          WHERE image_active = 1
          GROUP BY cat_id";
  $result = $site_db->query($sql);

from global.php. Is there any way to put the result of this in the cache to speed things up?

I believe the time increases linearly with the number of files. I'm running the mysql under xampps with windows xp and 70,000 files in the database. Category pages show up in 0.7 seconds with cache; this mysql query takes 0.55 seconds.

As a side note, I sped up the details.php page by commenting out the next/prev file section, and use include of global2.php where global2.php has the code above commented out. No the most finesse way, I know. Also, the "show new" feature seems to take a lot of resources, but then all 70,000 files in my test database were new.

So if anyone know how to cache the above code, please post it. Thanks.

Pages: [1]