-2

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 ?

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 .

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 ?

Mitch Wheat
  • 295,962
  • 43
  • 465
  • 541

1 Answers1

-2

If data is inserting/updating in this tables at the time of select query you may face deadlock issues.

Try with(nolock) and check if table has proper indexes.

select * from table with(nolock) where 1=1

Rebuild the indexes.

bunbun
  • 2,595
  • 3
  • 34
  • 52