Click here to Skip to main content
11,710,472 members (89,191 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
I have huge database in sql server 2005 and when i use select query with where conditions then it will get more response time to display that data on vb.net datagridview. can anybody help me to overcome this issue or how to use JIT.
Posted 18-Dec-12 23:55pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You don't use JIT - read this for more of an explanation of what exactly JIT is http://en.wikipedia.org/wiki/Just-in-time_compilation[^].

As for you query, take a look at this article http://hungred.com/useful-information/ways-optimize-sql-queries/[^]
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Database:
1. Create index on columns which you use in where conditions.
2. Use same datatypes on where conditions e.g. emp_id (number) = 123
3. Create a Stored Procedure to fetch the data rather than using dynamic queries
4. Fetch data from tables rather than views
5. If you fetch data from multiple tables, use joins rather than subqueries
6. Avoid using functions on select columns

.Net code:
1. Use classes from SQL provider (System.Data.SqlClient) only to fetch the data.

These are the steps you can start with for the performance improvement. Once you start these kind of optimization, you will realize that there is no magic to get data within seconds.
  Permalink  
v2

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 549
1 OriginalGriff 260
2 Peter Leow 134
3 Abhinav S 130
4 Richard MacCutchan 90
0 Abhinav S 60
1 Member 4653839 40
2 barneyman 35
3 Sergey Alexandrovich Kryukov 35
4 Member 11793820 35


Advertise | Privacy | Mobile
Web02 | 2.8.150819.1 | Last Updated 19 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100