Most Popular

1500 questions
19
votes
1 answer

What factors go into an Indexed View's Clustered Index being selected?

Briefly What factors go into they query optimizer's selection of an indexed view's index? For me, indexed views seem to defy what I understand about how the Optimizer picks indexes. I've seen this asked before, but the OP wasn't too well received.…
EBarr
  • 670
  • 6
  • 13
19
votes
2 answers

How do I show the binlog_format on a MySQL server?

How do I show the binlog_format on a MySQL server? And if I dont like it how do I set it to XX permanently? Where XX is STATEMENT, ROW or MIXED.
Nifle
  • 1,442
  • 7
  • 17
  • 30
19
votes
2 answers

PostgreSQL Index Caching

I'm having difficulty finding 'lay' explanations of how indexes are cached in PostgreSQL, so I'd like a reality check on any or all of these assumptions: PostgreSQL indexes, like rows, live on disk but may be cached. An index may be entirely in the…
davetapley
  • 833
  • 4
  • 8
  • 14
19
votes
1 answer

Choice of authentication approach for financial app on PostgreSQL

First some background. The LedgerSMB project is an open source financial accounting software project that runs on PostgreSQL. We implement a very large amount of business logic in user defined functions, which act as the main mapping tool between…
Chris Travers
  • 12,804
  • 48
  • 95
19
votes
4 answers

SSMS Tools Pack Alternative

Are there any tools out there comparable to SSMS Tools Pack 2012? The licensing ($30 per machine, $100 for any number of machines... for 3 months) leaves a lot to be desired and I wasn't sure of what other options are available. For example, one…
WernerCD
  • 1,205
  • 3
  • 11
  • 19
19
votes
2 answers

During a log backup is the data backed up to the start or end of the operation?

Say I am running a log backup, and that log backup takes 10 minutes to complete. During that 10 minute window, further transactions are run. Given the below example, which transactions does the log backup actually contain? Transaction A…
George.Palacios
  • 5,528
  • 19
  • 48
19
votes
2 answers

Which collation should I use for biblical Hebrew?

Which SQL Server collation should I use for biblical Hebrew? The database under consideration needs to accommodate diacritics (i.e., vowels, accents, trope, etc.).
19
votes
2 answers

How does case-insensitive collation work?

Default collation type in SQL Server allows for indexing against case insensitive strings yet the case of the data is persisted. How does this actually work? I'm looking for the actual nuts and bolts, bits and bytes, or a good resource that…
cocogorilla
  • 479
  • 3
  • 13
19
votes
7 answers

MySQL - How to check for a value in all columns

I am curious, is there a good way to search all columns for a given value? For my purposes, it doesn't need to be at all fast, it's just a 1-off kinda thing, and I don't really want to have to type out every field name. That's precisely what I'll be…
donutguy640
  • 389
  • 1
  • 3
  • 11
19
votes
3 answers

Restrict update on certain columns. Only allow stored procedure to update those columns

I have sensitive price columns that I would like to have updated only through a stored procedure. I would like all code or manual attempts to alter values in these price columns to fail if it is not using the stored procedures designed to update it.…
Elias
  • 301
  • 1
  • 2
  • 6
19
votes
5 answers

What is the appropriate index architecture when forced to implement IsDeleted (soft deletes)?

Currently, we have an existing database and application that is fully functional. I do not have the ability to change the architecture at this point. Today, each table in the database has an "IsDeleted" NOT NULL BIT field with a default of '0'. When…
Jerad Skinner
19
votes
2 answers

Sql Server - Best Practices for Growing Database Files

I have been monitoring file growth via the data collector in sql server 2008 r2 for two weeks. The database is growing consistently at around 35(MB)/Day. The DB has not yet hit the initial size of 2 GB. The DB files auto growth is set to 5MB and I…
19
votes
2 answers

Designing a user authenication (Roles & Rights) module

I am trying to model a User Authentication module for a MS SQL Server database that will be the back end to a Delphi UI Application. Basically, I want to have user accounts where the user belongs to only one group. A group can have "n" number of…
19
votes
7 answers

Optimizing numeric range (interval) searches in SQL Server

This question is similar to Optimizing IP Range Search? but that one is restricted to SQL Server 2000. Suppose I have 10 million ranges provisionally stored in a table structured and populated as below. CREATE TABLE MyTable ( Id INT IDENTITY…
Martin Smith
  • 80,333
  • 15
  • 230
  • 323
19
votes
4 answers

CREATE FILE encountered operating system error 5 (Access is denied.)

I'm trying to execute the following script in SQL Server Management Studio: USE [master] GO CREATE DATABASE [test1] ON PRIMARY ( NAME = N'test1', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\test1.mdf', …
thiagocfb
  • 293
  • 1
  • 2
  • 4