Database Administrators Weekly Newsletter
Database Administrators Weekly Newsletter

Top new questions this week:

Why would SELECT * be magnitudes faster than SELECT foo?

Consider a table of values and hashes, like so: +------------+----------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | …

mysql performance select  
asked by dotancohen 15 votes
answered by Michael Green 24 votes

foreign key constraint violation issue

I have identified 3 situations. A student with no enrollments. A student with enrollments but no grades. A student with enrollments and grades. There is a trigger on the enrollments table to …

sql-server sql constraint  
asked by DowntownHippie 9 votes
answered by Paul White 6 votes

What happens during "big" inserts on a table with a clustered composite key?

My SQL knowledge is limited, so the terms I'll be using are most likely not the right ones. I have a table that will store test results, for multiple locations. The tests will be recorded in …

sql-server  
asked by user2210761 7 votes
answered by Brent Ozar 13 votes

Estimate projected database growth

I recently started working with SQL Server 2008 as a DBA trainee. I need calculate the size of the database but also estimate its growth over recent months and the predicted growth for the next 12 …

sql-server sql-server-2008 size  
asked by diegoxfs 7 votes
answered by Brent Ozar 15 votes

Index that is not used, yet influences query

I've got a PostgreSQL 9.3 table with some numbers and some additional data: CREATE TABLE mytable ( myid BIGINT, somedata BYTEA ) This table currently has about 10M records and takes 1GB of …

postgresql index index-tuning count query-plan  
asked by liori 5 votes
answered by jjanes 2 votes

SQL Server: Create New GUID Values for Existing Index

I have an existing table with about 6 million rows. The relevant columns are: ID int not null PK Key uniqueidentifier not null Read/write on this table by Key lookup is probably something like 100 …

sql-server sql-server-2012 index uniqueidentifier guid  
asked by ulty4life 4 votes
answered by Max Vernon 2 votes

Splitting a csv column from select query into multiple columns

I have a stored procedure SELECT [ShipWorks].[dbo].[OrderItem].[Code] AS Code, CASE WHEN (LEN(ISNULL(MAX([ShipWorks].[dbo].[OrderItem].[Location]),'')) = 1) THEN …

sql-server sql t-sql stored-procedures  
asked by zerodoc 4 votes
answered by Pieter Geerkens 4 votes

Greatest hits from previous weeks:

Find highest level of a hierarchical field: with vs without CTEs

note: this question has been updated to reflect that we are currently using MySQL, having done so, I would like to see a how much easier it would be if we switched to a CTE-supporting database. I …

mysql postgresql query hierarchical  
asked by David 22 votes
answered by RolandoMySQLDBA 28 votes

Sql Server database in recovery: How to stop, Take ofline or delete?

I have a development database which has entered recovery mode on restart, and has been recovering for the last hour or so. I need to either stop the recovery, or kill it in some way. I dont care one …

sql sql-server sql-server-2005  
asked by CrapHands 13 votes
answered by gbn 19 votes

Can you answer these?

How to move 200 materialized views without having to re-create in the new home

I am moving a database with 200 materialized views into a new server. All of them are 'fast refresh' materialized views , means they have corresponding materialized view logs, in this case sitting on …

oracle migration indexed-view  
asked by Rav 1 vote

Conceptual model vs Logical model vs Physical model

I'm doing a work about database, and now I need to show three different images, one image with the conceptual model, other with logical model and other with physical model of a database. I'm looking …

mysql database-design database-recommendation  
asked by Marby 1 vote

Column Data Type for Bitwise Comparison?

I have a table where I have an int32 column storing values for bitwise comparison. I've ran out int space with a int32. I can convert to int64 but that will just prolong the inevitable. Is there an …

sql-server  
asked by mxmissile 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