SQL, does it matter?

Discuss phpBB 3.0.x in general.
Forum rules
Please post any phpBB 3.1.x related topics in the forum.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
User avatar
Krank
Member
Member
Posts: 90
Joined: 28 Sep 2006, 21:25
Location: Somewhere
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

SQL, does it matter?

Postby Krank » 28 Feb 2007, 13:04

hey, with SQL tables or whatever you call it, when you install phpBB its 32 tables right? or something like that

i've seen a lot of posts, that some like to keep their sql at a low scale..etc but does it really matter? i mean vBulletin, with no MODs installed its around umm 60?

so the number doesn't matter right? its the code that calls SQL, and the server's specs right?

phpBB3 Je t'adore: subSilver2 Based styles fan
proSilver, good, but too .... I don't know just too... :P

User avatar
igorw
Past Contributor
Past Contributor
Posts: 1967
Joined: 01 Jun 2006, 20:48
Real name: Igor
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby igorw » 28 Feb 2007, 13:40

The ammount of tables shouldn't really matter much, if you write code that queries it efficiently ;)

- we're poor!

User avatar
drathbun
Member
Member
Posts: 156
Joined: 26 Jul 2006, 00:02
Contact:

Postby drathbun » 28 Feb 2007, 17:29

I have over 80 tables in a highly modified phpBB. :-)

As evil<3 says, it's not the number of tables you have, it's what you do with them. ;-) For example, avoid running queries inside a loop. Avoid using outer joins... one big query is not always more efficient than two smaller ones. I have a blog post coming out on this soon.

Make sure your queries are using the correct indexes. There are some "weird" tricks that you can use to encourage the database to process your query in a specific way. This is another blog post, I just haven't written it yet.

Make sure you use the proper "group by" clause. MySQL doesn't enforce the proper use of this clause, and it can get you into trouble by returning unexpected results and it's not going to be portable to different databases. I have a blog post on this coming out soon... it is partially written. :-)


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “phpBB 3.0.x "Olympus" discussion”

Who is online

Users browsing this forum: No registered users and 3 guests