Database Administrators Weekly Newsletter
Database Administrators Weekly Newsletter

2015 Community Moderator Election

The community moderator election is currently in the nomination phase.

Please review and comment on the nominees by August 3!

Top new questions this week:

Simultaneous calls to the same function: how are deadlocks occurring?

My function new_customer is called several times per second (but only once per session) by a web application. The very first thing it does is lock the customer table (to do an 'insert if not ...

postgresql deadlock postgresql-9.4  
asked by Jack Douglas 12 votes
answered by Jack Douglas 9 votes

Why is table variable forcing an index scan while temp table uses seek and bookmark lookup?

I am trying to understand why using a table variable is preventing the optimizer from using an index seek and then bookmark lookup versus an index scan. Populating the table: CREATE TABLE dbo.Test ...

sql-server sql-server-2008-r2 temp-tables optimizer table-variable  
asked by 8kb 8 votes
answered by Aaron Bertrand 11 votes

SET STATISTICS IO- worktable/workfile

I am executiong query, that produces plan: Statistics IO: Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob ...

sql-server sql-server-2012 query-plan  
asked by Jānis 7 votes
answered by Paul White 2 votes

Is it reasonable to mark all columns but one as primary key?

I have a table representing movies. The fields are: id (PK), title, genre, runtime, released_in, tags, origin, downloads. My database cannot be polluted by duplicated rows, so I want to enforce ...

postgresql database-design primary-key unique-key  
asked by rubik 7 votes
answered by Erwin Brandstetter 4 votes

Why is it bad practice to install SQL Server to the root of a drive

When I install SQL Server into the root of my drive, for example D:\, I get an error when I run a database deployer from a third party piece of software. But when I move my SQL Server instance to ...

sql-server installation  
asked by Sean 7 votes
answered by Shanky 9 votes

Find rows where integer sequence contains a given subsequence

Problem Note: I refer to the mathematical sequences, not the sequences mechanism of PostgreSQL. I have a table representing sequences of integers. The definition are: CREATE TABLE sequences ( id ...

sql postgresql performance schema array  
asked by mlpo 5 votes
answered by dnoeth 1 vote

sql server max memory includes SSIS?

I have installed 2 instances of sql server plus SSIS on the following server. Note the amount of RAM is nearly 384 GB And this is the max and min memory settings that I have applied to my 2 ...

sql-server ssis sql-server-2014 memory ssis-2014  
asked by marcelo miorelli 5 votes
answered by Kin 6 votes

Greatest hits from previous weeks:

Can MySQL reasonably perform queries on billions of rows?

I am planning on storing scans from a mass spectrometer in a MySQL database and would like to know whether storing and analyzing this amount of data is remotely feasible. I know performance varies ...

mysql sql database-design performance  
asked by haxney 197 votes
answered by Koliber Services 63 votes

How to import a .sql file in MySQL?

I am trying to import a .sql file using MySQL Workbench and I get this error: ERROR 1046 (3D000) at line 28: No database selected I have first created an empty database called with the same name as ...

mysql mysqldump import  
asked by Barbara Dreamer 6 votes
answered by tamashumi 0 votes

Can you answer these?

Select records where difference between datetime column1 and column 2 is greater than X amount of time

As the title indicates, I'm trying to return records where the datetime difference between two datetime columns is greater than X amount of time. I'm having trouble wrapping my head around this ...

mysql datetime  
asked by robotsushi 1 vote

Postgres - Error while adding constraints

Can anyone tell me what this error is? And How to resolve it? ERROR: could not read block 27651 in file "base/114689/118316": read only 4096 of 8192 bytes CONTEXT: SQL statement "SELECT ...

postgresql postgresql-9.4  
asked by Jeevitha 1 vote

SSIS Error - Login Failed for user 'sa'

I am running an SSIS package. However, I get the below error... The ExistsOnSQLServer method has encountered OLE DB error code 0x80040E4D (Login failed for user 'sa'.). The SQL statement issued ...

sql-server ssis  
asked by k09 1 vote
Subscribe to more Stack Exchange newsletters

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

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

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