Click here to Skip to main content
14,333,728 members
   

Database

 
PinnedHOW TO ANSWER A QUESTION PinPopular
Chris Maunder16-Jul-09 3:10
adminChris Maunder16-Jul-09 3:10 
PinnedHow to get an answer to your question PinPopular
Chris Maunder10-Nov-05 16:30
adminChris Maunder10-Nov-05 16:30 
QuestionHow do you separate in pages database results? Pin
Joan M4hrs 57mins ago
professionalJoan M4hrs 57mins ago 
QuestionMessage Closed Pin
16-Oct-19 22:05
memberbasimonica16-Oct-19 22:05 
QuestionI have a column and i need to find in which table this column exists throughout whole DB Pin
Anandkumar Prajapati8-Oct-19 19:29
professionalAnandkumar Prajapati8-Oct-19 19:29 
AnswerRe: I have a column and i need to find in which table this column exists throughout whole DB Pin
Victor Nijegorodov8-Oct-19 20:46
memberVictor Nijegorodov8-Oct-19 20:46 
AnswerRe: I have a column and i need to find in which table this column exists throughout whole DB Pin
Jörgen Andersson8-Oct-19 21:11
protectorJörgen Andersson8-Oct-19 21:11 
Questionvb.net connection to a firebird database Pin
Member 767827622-Sep-19 17:15
memberMember 767827622-Sep-19 17:15 
AnswerRe: vb.net connection to a firebird database Pin
Victor Nijegorodov22-Sep-19 20:12
memberVictor Nijegorodov22-Sep-19 20:12 
GeneralRe: vb.net connection to a firebird database Pin
Member 767827623-Sep-19 11:06
memberMember 767827623-Sep-19 11:06 
GeneralRe: vb.net connection to a firebird database Pin
Member 767827623-Sep-19 16:16
memberMember 767827623-Sep-19 16:16 
GeneralMessage Closed Pin
1-Oct-19 15:26
memberhayac h1-Oct-19 15:26 
QuestionMoving from access DB to Oracle to calculate average upon request Pin
Member 1447460719-Sep-19 11:12
memberMember 1447460719-Sep-19 11:12 
AnswerRe: Moving from access DB to Oracle to calculate average upon request Pin
Gerry Schmitz19-Sep-19 12:26
mveGerry Schmitz19-Sep-19 12:26 
QuestionMySQL database Pin
Alboyz17-Sep-19 16:46
memberAlboyz17-Sep-19 16:46 
AnswerRe: MySQL database Pin
#realJSOP18-Sep-19 1:08
mve#realJSOP18-Sep-19 1:08 
GeneralRe: MySQL database Pin
Alboyz18-Sep-19 16:58
memberAlboyz18-Sep-19 16:58 
AnswerRe: MySQL database Pin
Mycroft Holmes18-Sep-19 12:44
memberMycroft Holmes18-Sep-19 12:44 
GeneralRe: MySQL database Pin
Alboyz18-Sep-19 16:58
memberAlboyz18-Sep-19 16:58 
QuestionDatabase suddenly slow Pin
Super Lloyd17-Sep-19 15:39
memberSuper Lloyd17-Sep-19 15:39 
One of our reporting database is becoming mysteriously slow in the last 2 weeks. While it was working perfectly fine before that.

There was 2 tables with about 10 millions records each and it was working fine.
Now I have 3 tables with about 10 millions records (dunno if it change anything) bu t I am starting to have plenty of Timeout exception! Blush | :O

Case in point
This is simplest EF call:
(
    from ite in this.ItemTransactions
    where ite.DataSourceId == 3
    orderby ite.ItemTransactionId descending
    select new { ite.PrimaryIdInDataSource }
).FirstOrDefault()

and it generates this simple SQL
-- Region Parameters
DECLARE @p0 Int = 3
-- EndRegion
SELECT TOP (1) [t0].[PrimaryIdInDataSource]
FROM [ItemTransaction] AS [t0]
WHERE [t0].[DataSourceId] = @p0
ORDER BY [t0].[ItemTransactionId] DESC

Now it takes 2 minutes to run that SQL code in SQLSMS, which is suspiciously slow for only 6 millions records.
Also, when I run my C# code, EF timeout! Even thought I set the command timeout to be 10 minutes! Blush | :O

Most puzzling all this code was running fine 2 weeks ago... Can't find the reason in the TFS history.. Unsure | :~

--

[EDIT: Found it]

Between 2 recreations and data repopulation of the database.. someone one changed the primary key of many tables that were used in joins from CLUSTERED to NONClUSTERED index

That seemed like a good idea at the times, they said.... Poke tongue | ;-P
A new .NET Serializer
All in one Menu-Ribbon Bar
Taking over the world since 1371!


modified 19-Sep-19 2:48am.

AnswerRe: Database suddenly slow Pin
CHill6018-Sep-19 0:05
protectorCHill6018-Sep-19 0:05 
GeneralRe: Database suddenly slow Pin
Super Lloyd18-Sep-19 20:47
memberSuper Lloyd18-Sep-19 20:47 
AnswerRe: Database suddenly slow Pin
Richard Deeming18-Sep-19 1:01
mveRichard Deeming18-Sep-19 1:01 
GeneralRe: Database suddenly slow Pin
Super Lloyd18-Sep-19 20:47
memberSuper Lloyd18-Sep-19 20:47 
GeneralRe: Database suddenly slow Pin
Mycroft Holmes19-Sep-19 13:14
memberMycroft Holmes19-Sep-19 13:14 

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.