Arie Kusuma Atmaja <[EMAIL PROTECTED]> writes: > * Beware of binary fields. By default, all fields are returned with queries, > including the full contents of any binary fields. Use :select to pull out only > the fields you need. > > caranya: > kalo saya sih kecuali image berpiksel 50-an kali 50-an gak > ditaroh jadi blob field di DB
Kenapa tidak? Untuk image file, preference saya adalah menyimpannya di database, tapi dengan caching di filesystem. Dengan begitu data tetap di satu tempat, dan network traffic dan database load tidak tinggi. > * Write tables to cache data for reports that span months and > years. It.s much faster than re-generating a year.s worth of reports > every time a page is loaded. Data yang sudah tua mungkin juga bisa dipindahkan ke archive database. > * Don't cut costs on hardware. You.ll quickly lose the money you > thought you were saving if your developers have to spend even one > day a month on unexpected server maintenance due to poor backups or > cheap hardware. Juga jangan lakukan premature optimisation di software dan menulis code yang terlalu 'cool'. Maintenance mahal. > tips: > pakai ruby marshalling, atau kalau di postgres pasang tipe array field > # ciiiyeh yg lagi mabok ma postgres! baru belajar mulu' dari seabad > lalu' :-P Yang Arie maksud mungkin adalah bytea atau large object. pgsql's array type tidak berhubungan dengan blob data. > * Don't be too clever. Ruby has great metaprogramming features, but they are > easy to overuse (such as eval and method_missing). Atau untuk membuat code yang terlalu 'cool' dan trendy. YS

