Database Administrators Weekly Newsletter
Database Administrators Weekly Newsletter

Top new questions this week:

When are computed columns computed?

When are the values for computed columns determined? When the value is retrieved? When the value is changed? Some other time? I'm guessing this is a novice question since I'm not finding anything ...

sql-server computed-column  
asked by Shelby115 19 votes
answered by Arthur D 10 votes

Keeping (Partial) Backups Small when using SQL Server FILESTREAM

I have a database with nearly 1TB of FILESTREAM data that I don't need backed up (if the data was deleted it'd be recreated automatically in a couple of hours, so it just isn't important). Most of the ...

sql-server backup sql-server-2014 transaction-log filestream  
asked by David Murdoch 7 votes

Normalizing a table with a field that generally uniquely identifies a row, but is sometimes null

forgive me if this has been asked and answered before. I'm roughing out a schema for an inventory management system, to be implemented in PostgreSQL. All of our products and services have a sku. ...

postgresql database-design normalization  
asked by Harley 7 votes
answered by MDCCL 8 votes

Does table size matter?

I have a table like this (with more columns though): CREATE TABLE [dbo].[MyTable]( [SnapKey] [int] NOT NULL, [SnapDt] [smalldatetime] NOT NULL, [Company] [varchar](4) NOT NULL, ...

sql-server sql-server-2012 performance partitioning  
asked by FLICKER 6 votes
answered by Paul White 5 votes

Query wont compile/run

I have a query that won't run on the production server but it runs on the test server. It seems like the query plan won't compile or its compiling a very bad query plan. I have updated all statistics ...

sql-server sql query-performance sql-server-2014 execution-plan  
asked by Daniel Björk 6 votes
answered by Tom V 5 votes

Selecting one row from each group based on a Varchar field

Given a table Avenger whose data looks like this: id Avenger Type Power 1 Captain America foo 2 2 Captain America bar 3 3 Me foo 5 4 You ...

sql-server sql sql-server-2014 greatest-n-per-group  
asked by peacedog 5 votes
answered by JamesZ 5 votes

Are cursors/While loops the only way to make administrative changes to multiple databases?

I specifically want a programmable way to change the recovery model of all the databases on a server, and i know this solution can be applied to all 'Alter Database' commands. While I know SMO in ...

sql-server performance powershell smo alter-database  
asked by Luke Pafford 5 votes
answered by wBob 10 votes

Greatest hits from previous weeks:

Connect to sql plus from command line using connection string

Let's say I have a Oracle database. I have a username = x, password = y, database = z. Also I know the port = a, SID = b, Hostname = c. So how do I need to connect correctly? I used many options ...

oracle sqlplus string  
asked by Edvinas 8 votes
answered by Hanspeter Oberlin 14 votes

How do I insert a row which contains a foreign key?

Using PostgreSQL v9.1. I have the following tables: CREATE TABLE foo ( id BIGSERIAL NOT NULL UNIQUE PRIMARY KEY, type VARCHAR(60) NOT NULL UNIQUE ); CREATE TABLE bar ( id BIGSERIAL ...

sql postgresql foreign-key postgresql-9.1 insert  
asked by Stéphane 18 votes
answered by ypercubeᵀᴹ 28 votes

Can you answer these?

LOB_DATA, slow table scans and some I/O questions

I have a rather big table with one of the columns being an XML data with an average size of XML entry being ~15 kilobytes. All other columns are regular ints, bigints, GUIDs etc. To have some concrete ...

sql-server performance  
asked by Alex Sh 3 votes

What do LC_TIME and LC_NUMERIC settings actually change in PostgreSQL?

According to the PostgreSQL 9.5 documentation, LC_TIME affects "Formatting of dates and times" and LC_NUMERIC - "Formatting of numbers", but I can't seem to see any difference from changing these. ...

postgresql collation  
asked by E M 2 votes

Powershell Invoke-Sqlcmd Implicit Transaction

Does Powershell, through invoke-sqlcmd or through running a query directly through a cmdlet, wrap a query in an implicit transaction? And if so, is there a way to work around this should my query ...

sql-server transaction powershell  
asked by Dylan Bacon 1 vote
Subscribe to more Stack Exchange newsletters


Unsubscribe from this newsletter or change your email preferences by visiting your subscriptions page on stackexchange.com.

Questions? Comments? Let us know on our feedback site. If you no longer want to receive mail from Stack Exchange, unsubscribe from all stackexchange.com emails.

Stack Exchange, Inc. 110 William St, 28th Floor, NY NY 10038 <3