Archive

Posts Tagged ‘Mysql’

32 Tips To Speed Up Your MySQL Queries

October 7th, 2009 Wawan No comments

mysql If you are interested in how to create fast MySQL queries, this article is for you

  1. Use persistent connections to the database to avoid connection overhead.
  2. Check all tables have PRIMARY KEYs on columns with high cardinality (many rows match the key value). Well,`gender` column has low cardinality (selectivity), unique user id column has high one and is a good candidate to become a primary key.
  3. All references between different tables should usually be done with indices (which also means they must have identical data types so that joins based on the corresponding columns will be faster). Also check that fields that you often need to search in (appear frequently in WHERE, ORDER BY or GROUP BY clauses) have indices, but don’t add too many: the worst thing you can do is to add an index on every column of a table (I haven’t seen a table with more than 5 indices for a table, even 20-30 columns big). If you never refer to a column in comparisons, there’s no need to index it.
  4. Using simpler permissions when you issue GRANT statements enables MySQL to reduce permission-checking overhead when clients execute statements.
  5. Use less RAM per row by declaring columns only as large as they need to be to hold the values stored in them.
  6. Read more…

Categories: Mysql Tags:

Install PHP + Apache + Mysql

December 17th, 2008 Wawan 4 comments

Mungkin untuk sekarang ini soal PAM ini dah banyak yang expert, apalagi cara instalasi yang baru makin mudah aja terutama paketan PAM dkk orang jadi gak perlu mikir lagi untuk cara instalasi PAM ini, tinggal klik langsung jalan. Yang perlu dipikir tinggal script saja :D

Gak tau kenapa kalo saya kok lebih seneng install sendiri2 ya :D oleh karena itu biar saya juga gak lupa sekalian saja mumpung lagi mau mindahin server kecil divisi saya yang fungsinya cuman sebagai data cust dan tetekbengeknya, mau saya catet step2nya. Barangkali nanti berguna buat saya dikemudian hari apalagi bisa berguna buat pengunjung :D
Read more…

Categories: PHP Tags: , , , ,