Re: [SQL] SQL Query Performance tips

2005-01-31 Thread Michael Ossareh
Hi PFC Thanks for this! It has sped up complete - now in fact there is no delay! A few tweaks had to be made to the code ; here it is: select breakdown.alignment, sum(cnt) as num FROM ( (select alignment.name as class, count(1) as cnt from weapons, alignment where weapons

Re: [SQL] SQL Query Performance tips

2005-01-15 Thread PFC
If I understand well a person has all the free weapons which have a level <= to his own level, and of course all the weapons he bought. 1) get da weapons One query can only use one index. Bad for you ! Let's split the free and non-free weapons. 1a) free weapons S

[SQL] SQL Query Performance tips

2005-01-14 Thread Michael Ossareh
Hi All, I have a partial table structure as below tbl_user_main user_id pk user_level references tbl_level user_class references tbl_class user_level references tbl_level tbl_level level_id pk level_name level_points tbl_weapon wea