Langsung ke konten utama

Postingan

Menampilkan postingan dari Oktober, 2018

Golden Rule Berinteraksi Dengan Database

Ketika kita berinteraksi dengan database, maka ada Golden Rule yang harus selalu dipegang. Golden Rule ini disampaikan oleh Tom Kyte, Evangelist Oracle, dalam salah satu artikel di blog-nya  Sebisa mungkin, selalu gunakan satu perintah SQL.  Jika tidak bisa dalam satu perintah SQL, maka gunakan Stored Procedure  Jika tidak bisa menggunakan Stored Procedure, lakukan di aplikasi kita  Jika masih tidak bisa juga, mungkin kita perlu memikirkan masak-masak, sebenarnya perlu gak sih kita lakukan hal ini?  source : https://pojokprogrammer.net/content/belajar-sql-perhitungan-stok-dan-harga-rata-rata-barang-untuk-aplikasi-inventory

AdaptiveIndexDefrag

What’s the purpose of AdaptiveIndexDefrag?  The purpose for this procedure to perform an intelligent defrag on one or more indexes and statistics for one or more databases. In a nutshell, this procedure automatically chooses whether to rebuild or reorganize an index according to its fragmentation level, amongst other parameters, like if page locks are allowed or the existence of LOBs, while keeping statistics updated with a linear threshold. All within a specified time frame you choose, defaulting to 8 hours. The defrag priority can also be set, either on size, fragmentation level or index usage (based on range scan count), which is the default. It also handles partitioned indexes, columnstore indexes, indexes in In-Memory tables, statistics update (table-wide or only those related to indexes), rebuilding with the original fill factor or index padding and online operations, to name a few options. Does it only handle index and statistics?  Yes, but it is used as a part of a ...

How to BLOCK Select SSMS

SQL Server Management Studio has so much capability, yet most people I meet don’t seem to have read the manual to discover it. So I thought I might post a few of features I find invaluable. This works for SQL 2005, SQL2008, SQL2008 R2 & Visual Studio. Summary: Tip 1:  It is possible to “ALT + Select” to highlight a block of text to work on. Tip 2:  If you press ALT & stay in the same column (vertical line), it doesn’t select a block but instead selects an entire line, not just the partial top & partial bottom lines. The following is a quick example of what I mean plus a few other uses you may not have thought of. Example: Tip 1:  It is possible to “ALT + Select” to highlight a block of text to work on. eg: Hold the ALT key, Left Click & move your Mouse produces the Blue “Selected” region in picture below. You must press ALT prior to moving the mouse.   If I hit DELETE, then I remove just those characters so they all line up nex...