The site is slow lately, and I am doing everything to get it back on track... One of the main problems is the way NEXT en PREV images are calculated.. The query that is creating those long locks on the tables is :
SELECT id,inputdate FROM picture WHERE id < $id ORDER BY id DESC LIMIT 1;
SELECT id,inputdate FROM picture WHERE id > $id ORDER BY id ASC LIMIT 1;
These queries lock this table, and costs a lot of CPU power, if somebody has suggestions to make a quicker query to select the next or prev id, I am thinking of removing the NEXT and PREV for normal members,.. and introducing it to Sponsor members only...
SELECT id,inputdate FROM picture WHERE id < $id ORDER BY id DESC LIMIT 1;
SELECT id,inputdate FROM picture WHERE id > $id ORDER BY id ASC LIMIT 1;
These queries lock this table, and costs a lot of CPU power, if somebody has suggestions to make a quicker query to select the next or prev id, I am thinking of removing the NEXT and PREV for normal members,.. and introducing it to Sponsor members only...
