500 + Queries Logged in phoca gallery page

Phoca Gallery - image gallery extension
arunoid
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 17 Apr 2012, 14:56

500 + Queries Logged in phoca gallery page

Post by arunoid »

i have 500+ gallery Categories with phoca gallery.

when i debug the phoca gallery page i noticed that 500+ queries requesting from the database. will these one of the reason for my server cpu and sql loading?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49150
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: 500 + Queries Logged in phoca gallery page

Post by Jan »

Hi, really don't know the place where sql will be loaded for every category? Do you use some other extensions which are using the gallery? Can you paste more details here?
If you find Phoca extensions useful, please support the project
arunoid
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 17 Apr 2012, 14:56

Re: 500 + Queries Logged in phoca gallery page

Post by arunoid »

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49150
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: 500 + Queries Logged in phoca gallery page

Post by Jan »

Not sure, but try to do the following:

Got to administration - Phoca Gallery - Settings.

In Settings, see Categories View Settings - Categories Image Ordering: Special (set Special)

(in case your gallery contains a lot of categories, this saves access queries for all the categories)

Jan
If you find Phoca extensions useful, please support the project
Ansolon
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 09 Mar 2012, 13:52

Re: 500 + Queries Logged in phoca gallery page

Post by Ansolon »

it is happening Front page of Gallery Page

I also have 700 categories. But just 2 main categories at this time.

It opens just 2 main categories. However it queries all categories.

After I did what you told JAn query decrease 670 to 50 its very good for frontpage gallery.

Just Thumbnails become directory which we can change I Ithink?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49150
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: 500 + Queries Logged in phoca gallery page

Post by Jan »

Hi, reducing the queries means, the ordering of category will be taken from main sql query - this will reduce the memory but you cannot order it e.g. by random, etc.

Jan
If you find Phoca extensions useful, please support the project
Post Reply