Author |
Topic |
san79
Starting Member
42 Posts |
Posted - 2008-03-31 : 09:52:58
|
hiis there any quick way to search for a value in a table which stores very large number of data say around 1 million records.best regardss.an |
|
Imukai
Starting Member
29 Posts |
Posted - 2008-03-31 : 09:59:01
|
SELECT * FROM Table WHERE Column = 'whatever'"Quickness" is a relative term and will depend on whether that table is indexed, how fast the server is, memory, disk defragmentation, orientation of the moon, etc. |
 |
|
elancaster
A very urgent SQL Yakette
1208 Posts |
Posted - 2008-03-31 : 09:59:38
|
you mean other than a select query? or are you asking about indexes / optimisation etc?Em |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-03-31 : 13:14:51
|
Can you specify what exactly you're looking at? |
 |
|
san79
Starting Member
42 Posts |
Posted - 2008-04-01 : 02:13:14
|
yes it is other than select query, i am having an indexed table i am trying to find a record if it is already exists or not, using select query but during course of operations the time consumed by select command is getting greater and greater, so i need some sort of other ways to retrieve the record quickly than select command. my system is a PIV 2.3 GHZ with 512 MB RAM any alternative ways are greatly appriciated |
 |
|
Imukai
Starting Member
29 Posts |
Posted - 2008-04-01 : 07:36:13
|
Pretty sure a SELECT statement is your only option for selecting a record from the database. If your data has grown to be so large as to have a performance impact - I would suggest first that you add memory to that server. 512MB is not a lot of room for SQL to breathe at all. Memory is cheap.. and increasing that to 2GB would/should give you a dramatic boost in performance.Other than that you might look into archiving older data into a 2nd database, so your active database only contains relevant records? But honestly - at least to me, system memory should be your first priority in that case. |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-04-01 : 10:19:22
|
You told your table is indexed. But are you sure that you've proper indexes in place? Also have you had a look at execution plan to see if existing index is being used by query engine? |
 |
|
san79
Starting Member
42 Posts |
Posted - 2008-04-02 : 00:56:19
|
i have indexed the billno column which i search frequently , but i dont know how to use execution plan to check index being used by query engine any help? |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-04-02 : 04:36:54
|
Just select display actual execution plan icon on top menu bar of SSMS. Then you will get execution plan tab along with results. Look into plan and check if its having index scan/seek step for your created index. |
 |
|
|