March 25, 2006 at 4:03 am
Hello
In one of my table I am having 300000+ records. I simply run (select * from table1) query in query analyzer. It never returns any kind of resultset, infact it hangs query analyzer. I have already set an index on first column as cluster index. All the fields are varchar fields.
Is there anything other I need to do tune sql server?
I want to use this resultset in quantumgrid with Visual Basic, Can I not use ado paging in Quantumgrid and How?
Ashu
March 25, 2006 at 5:43 am
Why do you want to return every single field, in every single record, for such a large table?
A clustered index will help if you run a query with a suitable WHERE clause, eg:
select id, field1, field2 from table
where id > 6 and id < 2000
but clustering the index and then selecting everything does you no good.
By the way, using SELECT * is generally considered bad practice. Your performance will improve if you select the least possible amount of rows and columns.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
March 26, 2006 at 11:53 am
Phil
Thanks for the reply. I want to display this datas(approx 357000 records) in quantumgrid, there is no condition with sql statement. Secondly I have already tried clustered index, it run at query analyzer in approx 40 seconds on server. But when I called from client machine using VB application it gives me error 'Object is closed', some times 'connection time out' ( I have increased connection timeout in the code)
Secondly as you said that 'select *' is considered a bad practice, so I tried using Store Procedure with also, but nothing clicks.
Let me suggest, do you have any other trick or ideas?
Ashish
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply