Category: SQL Quick Fixes

  • Setting JDBC Fetch Size in Hibernate

    In my personal experience, far more database performance problems are actually application side problems, particularly with Java and Hibernate. A key goal is to minimize network traffic between Oracle and the application by setting appropriate fetch size.. What are your needs and expectations? When working with a query, some basic questions that should be asked:…

  • SQL Quick Fix #1 – Never UPDATE Primary Key (or unchange) Columns

    Never UPDATE primary key (PK) columns, not even to their current value.  Not only is it bad practice and bad design, it results in unnecessary checking for child rows if there are foreign keys (FK) referencing the primary key. An UPDATE statement should only update the columns that are actually receiving new values.   When a…