Tag Archives: Databases and SQL

Freeing space in SQL Server

When running my local development environment, I frequently need to free up space in SQL Server. How is this done? Firstly, ff there are databases you don’t need, delete them with: ALTER DATABASE your_db SET SINGLE_USER WITH ROLLBACK IMMEDIATE DROP … Continue reading

Posted in SQL Server | Tagged , | Leave a comment

Hibernate Best Practices – Parameterising Criteria Queries

Recently one of our database team pointed out some queries that were not running efficiently. We looked into the queries and they were Hibernate criteria queries. Consider a simple helper method that is creating a predicate for use in a … Continue reading

Posted in Hibernate | Tagged , | Leave a comment

Data migration in SQL Server

Recently I’ve had to write a data migration for SQL Server to split a large table (28 million rows) into separate tables. Some notes here on my thoughts… Firstly, SQL Server has INSERT…SELECT syntax which allows you to copy from … Continue reading

Posted in Databases and SQL, SQL Server | Tagged , | Leave a comment

Finding slow queries in SQL Server

When you want to optimise your app, one of the most important things is to find your slowest database queries, to see if indexes are missing, or the queries should be rewritten. SQL Server stores statistics for its queries in … Continue reading

Posted in Performance, SQL Server | Tagged , | Leave a comment

Using database transactions with Apache Camel

Just put an example of using database transactions with Apache Camel on github: https://github.com/hedleyproctor/camel-transaction-example It is based on the example given at the start of Chapter 12 of “Camel In Action”, but using database transactions, rather than a JMS transaction. … Continue reading

Posted in Camel, Databases and SQL | Tagged , | Leave a comment

NoSQL databases, scaling and Project Voldemort

At the moment there is a lot of discussion of NoSQL databases. Rather than referring to a single thing, this term is more of a catch-all that refers to a number of different non-relational database designs. In fact, it is … Continue reading

Posted in Databases and SQL | Tagged | Leave a comment