Skip to main content
10 votes

Do we have 2 logical query processings, one with indexes and one without indexes?

tl;dr: Query planners are a big deal. In general, before an RDBMS backend executes a query, it first plans the query. There's more than one way to access the data, and the planner evaluates some of ...
J_H's user avatar
  • 7,605
8 votes
Accepted

Unit testing Systems with Logic Tightly Coupled with Data

I've implemented automated testing including the database in a system with some of the same problems. The approach I took was roughly: Before all unit tests, bring up a DB from scratch with schema ...
Daenyth's user avatar
  • 8,147
4 votes

Unit testing Systems with Logic Tightly Coupled with Data

Assuming all logic is within your DB, in stored procedures, and you simply cannot change that in your project, I'd do the following: (optional) Refactor your stored procedures in order that each one ...
Emerson Cardoso's user avatar
2 votes
Accepted

T-SQL Development debate, which is the correct approach

This would be better on dba.stackexchange.com XACT_STATE() does not effect the behavior of the rollback. It is about state. 1 The current request has an active user transaction. The request ...
paparazzo's user avatar
  • 1,927
2 votes

Combine union with distinct

Based on the query you have provided I am assuming the DistinctValue column does not initially give you a set of distinct values so one approach you may try is the following: SELECT DISTINCT ...
JordanMSchall's user avatar
2 votes

Do we have 2 logical query processings, one with indexes and one without indexes?

How is a sql query processed when there are indexes, that is, would this behavior change? That diagram describes a process for determining what data a given query will return. It has nothing to do ...
Caleth's user avatar
  • 11.6k
1 vote

How to write robust or alternative to TSQL data processing routines in SqlServer?

Your specific table variable example isn't literally true since table types exist (https://docs.microsoft.com/en-us/sql/t-sql/statements/create-type-transact-sql). So if you have an exact same ...
Chris Rolliston's user avatar
1 vote

Unit testing Systems with Logic Tightly Coupled with Data

You can try to build mocks, stubs and fakes around your units as replacement for the dependencies. I haven't got much experience with VB.NET but I'm sure there are unit testing frameworks out there ...
bemk's user avatar
  • 39

Only top scored, non community-wiki answers of a minimum length are eligible