Click here to Skip to main content
15,898,902 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
Problem

I have table have 20 columns when make select data from new SQL query computer hangs ?

what suggestion to make quickly read data from this table and make performance good ?


Computer Capability

==============

i work on SQL server 2012.

select data from this table hangs computer although my computer capability not bad

ram 8 GIGA and processor core I 5 .

I try same Backup of data on another computer it take too much time as above ?

==============

if possible what suggestions to select data quickly from table and best performance ?

What I have tried:

What I Try 

==========

select * from table where 1=1 take 45 minutes 

after minimize column number as 

select column 1,column 2,column 3 from table also hangs but take less time as 42 minutes .

when make select data from tables not other programs open only SQL server opened new query.

table have 1 million records .
Posted
Updated 16-Dec-18 14:24pm

Quote:
select * from table where 1=1 take 45 minutes
table have 1 million records .

You are selecting 1 million records in a single select and you wonder why it takes time ?
You need a really faster server and a really fast network too.
Or learn database design.

PS: After 99 question, you still don't know what information are useful to us.
 
Share this answer
 
Comments
ahmed_sa 16-Dec-18 20:25pm    
THANK YOU FOR REPLY THE GOAL FROM MY QUESTION WHAT IS SUGGEST TO MAKE PERFORMANCE BEST
NOT selecting milion rows
Patrice T 16-Dec-18 20:43pm    
May be telling us what you try to do is a good start.
Richard Deeming 18-Dec-18 12:16pm    
"WHAT IS SUGGEST TO MAKE PERFORMANCE BEST
NOT selecting milion rows"


You've just answered your own question. Not selecting a million rows is the only sensible way to improve the performance.
Your query is retrieving all 1,000,000 records from a table and you wonder why it takes so long? The problem is you're retrieving 1,000,000 records from a table!

Your machine spec's don't mean a damn thing.

Your database design, indexing, how you're using the data, and where you're doing the processing needs to be reviewed and probably redesigned from the ground up to improve performance.
 
Share this answer
 
v2
i believe as program as we think.
if i give 1kg of rice to place at distance. u will be as quick as.
if i give to 100kg of rice then u will take time.
in Single time its not possible to carry , so u will try to move in 4 attempt depends on ur capacity.

if your really need to carry in one attempt in you have to increase capacity by buying Minnie truck.

as same in program also.. or you can save data like year wise in one table.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900