We're not sure if this is a joke or just (more likely) the work of an idiot. Here are 15 Tips for better performance and tuning in Oracle SQL and PL/SQL:
- FTS (Full Table Scans) are always bad and Index usage is always good.
- Usage of dynamic SQL within the stored procedure code is always bad even for search procedures.
- Empty Space in an index that gets created due to the DML operations do not get used.
- Indexes should be rebuilt at regular intervals.
- Indexes and statistics are the same thing. Also, histograms are needed only on indexed columns.
- Usage of cursors is always bad so avoid them like the plague.
- Truncate command cannot be rolled back because it is a non-logged operation.
- Table variables in SQL Server are always only memory resident.
- Column order in a covered index does not matter.
- In the case of SQL Server, one can separate the clustered index from the table.
- Only committed data gets written to the disk.
- Logical I/Os (LIO) are not a cause of concern, only Physical IO (PIO) are.
- Count(1) is better performing than count(*).
- Issue frequent commits in the application to make the transaction faster and also improve concurrency.
- Views are evil evil DB Objects that always slow down performance.
We like the fact that 8, 9 and 10 appear to be about SQL Server, despite the heading. Probably Nawal could only think of 12 fake Oracle tips but thought nobody would notice. Can you help him out with some more misleading tips for Oracle? (Or SQL Server. Nobody will notice.) For example,
- The buffer cache hit ratio is a reliable indicator of system performance.
- Bitmap indexes are perfect for columns with a small number of distinct values, like 'Y' and 'N'.
- The Inuit have fifty words for snow.
Spotted by Michel Cadot on Oracle-L.
Update: Yong Huang pointed out that the source of the article appears to be a list of common myths posted on a SQL Server blog, which makes it slightly less funny than it first seemed. Oh well.