Scratchbook

Das Leben ist immer anders als die Realität.

Von 725 auf 36 in 30 Minuten

Claude, 23. Januar 2007, 17:43 Uhr

Warning: Use of undefined constant ri_rand_compare - assumed 'ri_rand_compare' (this will throw an Error in a future version of PHP) in /home/httpd/vhosts/scratchbook.ch/httpdocs/wp-content/plugins/random-image-widget/random_image.php on line 129 Warning: Use of undefined constant ri_rand_compare - assumed 'ri_rand_compare' (this will throw an Error in a future version of PHP) in /home/httpd/vhosts/scratchbook.ch/httpdocs/wp-content/plugins/random-image-widget/random_image.php on line 130 Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/httpd/vhosts/scratchbook.ch/httpdocs/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384 Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/httpd/vhosts/scratchbook.ch/httpdocs/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384 Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/httpd/vhosts/scratchbook.ch/httpdocs/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384 Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/httpd/vhosts/scratchbook.ch/httpdocs/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384 Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/httpd/vhosts/scratchbook.ch/httpdocs/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384 Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/httpd/vhosts/scratchbook.ch/httpdocs/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384 Warning: preg_match_all(): Compilation failed: invalid range in character class at offset 4 in /home/httpd/vhosts/scratchbook.ch/httpdocs/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 700 Warning: Invalid argument supplied for foreach() in /home/httpd/vhosts/scratchbook.ch/httpdocs/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 707 Warning: preg_match_all(): Compilation failed: invalid range in character class at offset 4 in /home/httpd/vhosts/scratchbook.ch/httpdocs/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 700 Warning: Invalid argument supplied for foreach() in /home/httpd/vhosts/scratchbook.ch/httpdocs/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 707

Also ich weiss ja nicht was sich WordPress-Plugin Entwickler so denken. Aber das Plugin „get_recent_comments“ Ist 725 Zeilen lang, hat irgendwelche komischen „LEFT JOIN“-Statements drin und ist mit Abstand das Plugin, welches am meisten Ladezeit verbraucht.

Denn eigentlich ist es ja keine Sache, schnell die letzten fünf Kommentare in einem Menü anzeigen zu lassen – oder?
Naja, jedenfalls habe ich mich schnell hingesetzt und das Plugin neu geschrieben; aber diesmal nach meinen Anforderungen. Das Resultat sind 36 Zeilen (mit Kommentaren!), die so flink sind, dass ich nun sogar das Caching wieder abschalten kann.

Fazit: „JOIN“-Elemente haben in SQL-Statements nichts zu suchen. Also ich weiss nicht wofür die gut sein sollen, ausser mächtig Resourcen zu fressen.
Und jaja, möglichst viele Features und Ausschmückungen; doch Usability und Performance bleiben auf der Strecke…

Mann!

Wi!!iam Wa!!ace

hehe de scheff isch widr am wärk 😀

Longneck

juhuu, durch s abschalte vom caching isch s banner au widr zuefällig bi jedem klick!

rakudave

seeeehr guet *schulterklopf*

Longneck

thx

foxie

hehe, lol

Freidenker

tiptop. joins mache scho sinn, aber ersch bi datebanke, wo recht gross sin und extrem normalisiert. z.b. die datebank, wo em claude sini lehrfirma het, isch ganz klar sone kandidat: öbe 15TB…

Longneck

so? denn erklär mol dr sinn!

…kei wunder isch s SAP bi uns so langsam… die benutze JOINs…

Wi!!iam Wa!!ace

Freidenker redisch du vo de 4 & 5te normal form? oder goht dä schwachsinn no wyter 6,7,8???

das würdi mich imfall au wundernä!

aber in däm stiel wo mir DBs bis jetzt entgege cho sind, machts bis zur 3te normal form sinn. aber nun ja bi au in re kleine buude dehei 😉

Freidenker

heheh… ja, im „normalfall“ goht me bis öbe 3-4 normallform… aber sgoht au witer bis 6, han i scho gseh…. aber das isch denn e seeeeeeh spezielli db und die wotsch nid aluege, will denn en nervezämmebruch hesch 😉 chöne ja mol den e DB workshop mache, wenn dr luscht hend 😉

Wi!!iam Wa!!ace

jo also mir hän „nur“ bis zur dritte glehrnt. jo emol so e kurze yblick würdi mich scho intressiere, demit ichs emol gseh han, und eine mini froge könnti aktiv beantworte.

Freidenker

jo luege mol, chöne mal wieder e kabelsalat convention mache 😉

Warning: count(): Parameter must be an array or an object that implements Countable in /home/httpd/vhosts/scratchbook.ch/httpdocs/wp-content/themes/scratchbook/navigation_bar_bottom.php on line 1