Click here to Skip to main content
15,886,737 members
Home / Discussions / Database
   

Database

 
GeneralRe: What order to be followed while generating schema upgrade script? Pin
Mycroft Holmes27-Feb-13 22:15
professionalMycroft Holmes27-Feb-13 22:15 
QuestionSQL weirdness when aliasing columns Pin
Gregory Gadow22-Feb-13 11:19
Gregory Gadow22-Feb-13 11:19 
AnswerRe: SQL weirdness when aliasing columns Pin
gvprabu22-Feb-13 18:18
gvprabu22-Feb-13 18:18 
AnswerRe: SQL weirdness when aliasing columns Pin
Mycroft Holmes24-Feb-13 13:08
professionalMycroft Holmes24-Feb-13 13:08 
GeneralRe: SQL weirdness when aliasing columns Pin
Gregory Gadow28-Feb-13 9:09
Gregory Gadow28-Feb-13 9:09 
GeneralRe: SQL weirdness when aliasing columns Pin
Mycroft Holmes28-Feb-13 12:04
professionalMycroft Holmes28-Feb-13 12:04 
GeneralRe: SQL weirdness when aliasing columns Pin
Gregory Gadow1-Mar-13 5:10
Gregory Gadow1-Mar-13 5:10 
AnswerSolution Pin
Gregory Gadow1-Mar-13 9:28
Gregory Gadow1-Mar-13 9:28 
I traced the problem to a piece of code that uses SqlDataAdapter.Fill to populate a DataSet, then took to the Internet.

It turns out that there is some optimization that SQL does with queries, where it tries to import indexes from underlying tables. This works fine as long as the columns in the view match up with the columns from the tables. When you alias the query's columns, however, things can degenerate into a quagmire of competing indexes; the delay is caused by SQL trying to wait out a resolution. You can get rid of the delay by instructing SQL to abandon arithmetic operations that result in an overflow or underflow. Huh? WTF | :WTF:

The solution was to prefix the query with SET ARITHABORT ON; which tells SQL to just fly over the swamp rather than try to navigate through it. After the query, tack on ; SET ARITHABORT OFF; to reset the server variable, mainly because there is probably a reason why it set to OFF in the first place.
GeneralRe: Solution Pin
Mycroft Holmes1-Mar-13 11:53
professionalMycroft Holmes1-Mar-13 11:53 
QuestionDatabase Pin
Member 961179522-Feb-13 8:52
Member 961179522-Feb-13 8:52 
AnswerRe: Database Pin
jschell22-Feb-13 9:30
jschell22-Feb-13 9:30 
AnswerRe: Database Pin
R. Giskard Reventlov22-Feb-13 10:38
R. Giskard Reventlov22-Feb-13 10:38 
GeneralRe: Database Pin
Member 961179523-Feb-13 1:05
Member 961179523-Feb-13 1:05 
GeneralRe: Database Pin
S Douglas28-Feb-13 7:58
professionalS Douglas28-Feb-13 7:58 
AnswerRe: Database Pin
Jörgen Andersson22-Feb-13 11:11
professionalJörgen Andersson22-Feb-13 11:11 
AnswerRe: Database Pin
PIEBALDconsult22-Feb-13 13:38
mvePIEBALDconsult22-Feb-13 13:38 
QuestionSQL Server + Procedure or function has too many arguments specified Pin
Hemant Thaker21-Feb-13 18:53
Hemant Thaker21-Feb-13 18:53 
AnswerRe: SQL Server + Procedure or function has too many arguments specified Pin
Sandeep Mewara21-Feb-13 19:00
mveSandeep Mewara21-Feb-13 19:00 
AnswerRe: SQL Server + Procedure or function has too many arguments specified Pin
Mycroft Holmes21-Feb-13 20:29
professionalMycroft Holmes21-Feb-13 20:29 
AnswerRe: Resolved --> SQL Server + Procedure or function has too many arguments specified Pin
Hemant Thaker21-Feb-13 22:11
Hemant Thaker21-Feb-13 22:11 
QuestionDual Primary Key? Pin
Richard.Berry10021-Feb-13 6:25
Richard.Berry10021-Feb-13 6:25 
AnswerRe: Dual Primary Key? Pin
Eddy Vluggen21-Feb-13 7:10
professionalEddy Vluggen21-Feb-13 7:10 
GeneralRe: Dual Primary Key? Pin
Richard.Berry10021-Feb-13 7:42
Richard.Berry10021-Feb-13 7:42 
GeneralRe: Dual Primary Key? Pin
Eddy Vluggen21-Feb-13 8:32
professionalEddy Vluggen21-Feb-13 8:32 
GeneralRe: Dual Primary Key? Pin
Mycroft Holmes21-Feb-13 12:08
professionalMycroft Holmes21-Feb-13 12:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.