terça-feira, 20 de setembro de 2011

[DBA] - asktom , CWs

well, latelly I've been really busy on tunning some heavy queries on a great number of rows (using all of them).
So, I came across one of the pages from the Oracle SQL GURU, Tom Kyte
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:7413988573867

which came crashing down on some of my beliefs (or "CWs - Conventional Wisdom" as he calls them). He says:

"Other CW's (that are all 100% wrong)

o indexes mean fast=true, if the optimizer doesn't use them, the optimizer has
  a bug

o indexes need to be rebuilt frequently or on a scheduled basis

o rebuilt indexes are faster, smaller and better

o segments should have few extents -- double digit extents are really bad for
  performance

o all cursors in code should be explicit cursors, implicit cursors are slow and
  bad

o select count(1) is better then select count(*)

o procedural code is faster then doing it in SQL

o adding more CPU will make our systems faster

o index space is not reused

o nologging stops all redo log from being generated on that segment

o the most selective fiedls must be first in an index

o you should commit frequently to save resources and time

o a cold backup is better then a hot backup"

Sem comentários:

Enviar um comentário