SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


db slow ?


db slow ?

Author
Message
christophe.bernard 47659
christophe.bernard 47659
SSC Eights!
SSC Eights! (961 reputation)SSC Eights! (961 reputation)SSC Eights! (961 reputation)SSC Eights! (961 reputation)SSC Eights! (961 reputation)SSC Eights! (961 reputation)SSC Eights! (961 reputation)SSC Eights! (961 reputation)

Group: General Forum Members
Points: 961 Visits: 223
Hello all,
we have a database under sql server 2008.
This db contains some tables and one table contains 600 000 records in our production environments.
This table is fill by some mobile device who synchronize every x minutes
All works fine since several months ...

But friday, i must to check some information on the production system => make some query.
If begin by made a select * from xxxxxx
This SELECT takes 1 minutes and 30 seconds ...for to retrieve => 600 000 records

After several seconds, we notice that the mobile device can't synchronize WHILE the SELECT query isn"t complete ...

what we sould do ?
- add memory in our production server ?
- export old datas for example datas old than 30 days into another system
- ...

Or WHAT do you suggest for to avoid that ?
Is it many (1 minute and 30 second) for to make a select * from xxxx for 600 000 records ?

Thanks for your explanation guys
Eirikur Eiriksson
Eirikur Eiriksson
SSC Guru
SSC Guru (172K reputation)SSC Guru (172K reputation)SSC Guru (172K reputation)SSC Guru (172K reputation)SSC Guru (172K reputation)SSC Guru (172K reputation)SSC Guru (172K reputation)SSC Guru (172K reputation)

Group: General Forum Members
Points: 172349 Visits: 24471
christophe.bernard 47659 - Monday, February 12, 2018 8:29 AM
Hello all,
we have a database under sql server 2008.
This db contains some tables and one table contains 600 000 records in our production environments.
This table is fill by some mobile device who synchronize every x minutes
All works fine since several months ...

But friday, i must to check some information on the production system => make some query.
If begin by made a select * from xxxxxx
This SELECT takes 1 minutes and 30 seconds ...for to retrieve => 600 000 records

After several seconds, we notice that the mobile device can't synchronize WHILE the SELECT query isn"t complete ...

what we sould do ?
- add memory in our production server ?
- export old datas for example datas old than 30 days into another system
- ...

Or WHAT do you suggest for to avoid that ?
Is it many (1 minute and 30 second) for to make a select * from xxxx for 600 000 records ?

Thanks for your explanation guys

We need to know more, what are the specs, how much traffic, I/O performance, color of your ex-girlfriend hair etc.
Cool

Sue_H
Sue_H
SSC Guru
SSC Guru (82K reputation)SSC Guru (82K reputation)SSC Guru (82K reputation)SSC Guru (82K reputation)SSC Guru (82K reputation)SSC Guru (82K reputation)SSC Guru (82K reputation)SSC Guru (82K reputation)

Group: General Forum Members
Points: 82867 Visits: 16792
christophe.bernard 47659 - Monday, February 12, 2018 8:29 AM
Hello all,
we have a database under sql server 2008.
This db contains some tables and one table contains 600 000 records in our production environments.
This table is fill by some mobile device who synchronize every x minutes
All works fine since several months ...

But friday, i must to check some information on the production system => make some query.
If begin by made a select * from xxxxxx
This SELECT takes 1 minutes and 30 seconds ...for to retrieve => 600 000 records

After several seconds, we notice that the mobile device can't synchronize WHILE the SELECT query isn"t complete ...

what we sould do ?
- add memory in our production server ?
- export old datas for example datas old than 30 days into another system
- ...

Or WHAT do you suggest for to avoid that ?
Is it many (1 minute and 30 second) for to make a select * from xxxx for 600 000 records ?

Thanks for your explanation guys


You take shared locks when you select so the devices can't get their locks to synchronize (insert, update, etc).
As Eirikur already stated, we don't know enough about the data or table to say much else.
But do you really need to do a select * on a 600,000 row table? Do you really need all rows and all columns to start your query? Even if it didn't take that long (which does seem long in your case), I don't see where anyone could look through that much data. If you don't read through all of that data then you may want to change how you are querying. I worked on a similar vendor app and you really couldn't do something like that. there was a window of time where the devices usually weren't syncing and any ad hoc access was done during this window.

Sue



christophe.bernard 47659
christophe.bernard 47659
SSC Eights!
SSC Eights! (961 reputation)SSC Eights! (961 reputation)SSC Eights! (961 reputation)SSC Eights! (961 reputation)SSC Eights! (961 reputation)SSC Eights! (961 reputation)SSC Eights! (961 reputation)SSC Eights! (961 reputation)

Group: General Forum Members
Points: 961 Visits: 223
Hello all,
thanks for your reply and sorry for this delay ..

@eirikur => sorry but my knowledge are basic ...how mucj traffic / I/O performance ...
i don't know actually how to get this information but i'm search

@sue => yes i'm agree ...no of course i can make a select top 100 for exemple but when i'm go to the production system for to search in the system
i don't know the structure of the table i need to search ...and in fact if i made a select => that's tell we need to check because something are strange ....
but next time, i will make a TOP Smile

i'm trying to get more information and become with that
Eirikur Eiriksson
Eirikur Eiriksson
SSC Guru
SSC Guru (172K reputation)SSC Guru (172K reputation)SSC Guru (172K reputation)SSC Guru (172K reputation)SSC Guru (172K reputation)SSC Guru (172K reputation)SSC Guru (172K reputation)SSC Guru (172K reputation)

Group: General Forum Members
Points: 172349 Visits: 24471
christophe.bernard 47659 - Wednesday, February 14, 2018 2:45 AM
Hello all,
thanks for your reply and sorry for this delay ..

@eirikur => sorry but my knowledge are basic ...how mucj traffic / I/O performance ...
i don't know actually how to get this information but i'm search

@sue => yes i'm agree ...no of course i can make a select top 100 for exemple but when i'm go to the production system for to search in the system
i don't know the structure of the table i need to search ...and in fact if i made a select => that's tell we need to check because something are strange ....
but next time, i will make a TOP Smile

i'm trying to get more information and become with that

First thing to do is to run Glenn Berry

SQL Server Diagnostic Information Queries
Cool


Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (934K reputation)SSC Guru (934K reputation)SSC Guru (934K reputation)SSC Guru (934K reputation)SSC Guru (934K reputation)SSC Guru (934K reputation)SSC Guru (934K reputation)SSC Guru (934K reputation)

Group: General Forum Members
Points: 934725 Visits: 49053
christophe.bernard 47659 - Monday, February 12, 2018 8:29 AM
Hello all,
we have a database under sql server 2008.
This db contains some tables and one table contains 600 000 records in our production environments.
This table is fill by some mobile device who synchronize every x minutes
All works fine since several months ...

But friday, i must to check some information on the production system => make some query.
If begin by made a select * from xxxxxx
This SELECT takes 1 minutes and 30 seconds ...for to retrieve => 600 000 records

After several seconds, we notice that the mobile device can't synchronize WHILE the SELECT query isn"t complete ...

what we sould do ?
- add memory in our production server ?
- export old datas for example datas old than 30 days into another system
- ...

Or WHAT do you suggest for to avoid that ?
Is it many (1 minute and 30 second) for to make a select * from xxxx for 600 000 records ?

Thanks for your explanation guys


It's pretty simple... stop doing a select that returns all columns of all rows. Why on Earth are you doing such a thing? It's not like someone is going to read the information.,

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

When you put the right degree of spin on it, the number 318 is also a glyph that describes the nature of a DBAs job. Wink

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (934K reputation)SSC Guru (934K reputation)SSC Guru (934K reputation)SSC Guru (934K reputation)SSC Guru (934K reputation)SSC Guru (934K reputation)SSC Guru (934K reputation)SSC Guru (934K reputation)

Group: General Forum Members
Points: 934725 Visits: 49053
christophe.bernard 47659 - Wednesday, February 14, 2018 2:45 AM
Hello all,
thanks for your reply and sorry for this delay ..

@eirikur => sorry but my knowledge are basic ...how mucj traffic / I/O performance ...
i don't know actually how to get this information but i'm search

@sue => yes i'm agree ...no of course i can make a select top 100 for exemple but when i'm go to the production system for to search in the system
i don't know the structure of the table i need to search ...and in fact if i made a select => that's tell we need to check because something are strange ....
but next time, i will make a TOP Smile

i'm trying to get more information and become with that


If all you want to know are things like column names and datatypes, then use sp_help 'tablename'.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

When you put the right degree of spin on it, the number 318 is also a glyph that describes the nature of a DBAs job. Wink

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum









































































































































































SQLServerCentral


Search