スキップしてメイン コンテンツに移動

投稿

ラベル(performance)が付いた投稿を表示しています

6 Things You Shoud Check for MySQL Query Performance

In this post, I will explain some performance tuning tips for MySQL query. 1) Don't use wildcard (e.g. *) in SELECT (=Pick only required column on SELECT). 2) Comare performance between with and without 'JOIN'. Sometimes JOIN helps MySQL engine will reduce examined number of rows. But in my exeprience, most of the case, removing LEFT JOIN makes performance improvement. 3) Comare performance between with and without 'ORDER BY'. 4) Comare performance between with and without 'SQL_CALC_FOUND_ROWS'. 5) Check INDEX is properly used for JOIN, GROUP BY, ORDER BY. 6) Compare performance between following 2 strategy. a) pick up all required columns (sometimes with ORDER BY, DISTINCT, LIMIT etc.) by single query b) pick only required id column, and then pull all required columns using JOIN or execute 2nd query based on id columns picked up from the 1st query. Okay the last 6) might need example. 6) says " comapre performance following a)

Java Customize Serialization - Using Externalizable

I will show you how to customize Java serialization (Externalization), performance comparison default serialization vs my externalization implmentation in this post. In the most cases, you don't have to care about the serialization performance of default implementation. But the default implementation uses reflection so it might be a problem if you develop performance critical application. Externalizable Implement your own serialization is very simple. Just implements Externailizable interface into the class. Here is the example code - simple pojo class and TreeMap which implements Externalizable. package com.dukesoftware.demos.externalizable; import java.io.Externalizable; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; import java.util.ArrayList; import java.util.List; public class ExternalizableClass implements Externalizable{ private String field1; private Double field2; private List<String> field3; public S

Webサイトの高速化

2017年7月に内容を大幅に更新しました。 2017年現在では、Full SSL化やHTTP/2、PWAの技術が一般的になり、下記に紹介してきた書籍の内容は古くなっています。 たとえば、HTTP/2のリソースの並行ダウンロード機能は非常に有用です。 またdns-prefetch, preload, preconnectなど新しい機能が多く発表されてきています。 恐らく書籍下記の書籍はもう古すぎるので、発表当時ほどのインパクトは低く、あまり読む必要はないかと思います。 書籍 書籍下記の書籍はもう古すぎるので、発表当時ほどのインパクトは低く、あまり読む必要はないかと思います。記録のため残しておきます。 オライリーから出版されている ハイパフォーマンス Webサイト 原著のHigh Performance Web Sitesのページは こちら 。 原著者のSteve Soudersさんのホームページは こちら 。 また翻訳者の サポートページ があります。 続編の 続ハイパフォーマンス Webサイト   ツール PageSpeed Insights 有名過ぎるので、いまさら紹介するまでもありませんが、Google先生のは是非試してみてください。CSSスプライトを利用しなさい、Expiryをヘッダーに付加しなさい、gzip圧縮を有効にしなさいなど、色々なアドバイスを出してくれます。 WebPagetest 実際のページを表示する際に必要な画像をダウンロードするのにかかる時間を細かく測定し、Water fall chartやビデオなどでデータを出力してくれる非常に優れたツールです。 PageSpeed Insightsはスコアという形で表示されますが、実際のユーザの体感を調べるのはこちらのツールの方が優れていると思います。

ActionScript 3の高速化

ActionScript 3 最適化・高速化Tips 簡易まとめ ActionScript 3の高速化に関する記事です。 Seven tips about performance optimization in Actionscript 3 の記事も参考になります。 AIRLife.net さんの 記事 も大変参考になります。