Large table search performance

royvagner

New member
Large table search performance

I have a large table with 300,000 rows and it will grow in the future The table contains member profile details and it has many columns (about 70) The stored procedure that do the search use many columns to search the results That why the ‘Where’ is very long and the all operation take to many time, some time I get Time out exception form the SQL server. I’ll be happy to get some ideas how to do this search. I think maybe to divide the table to many tables by State. Something interesting is that the operation takes long time for the first search and then the second and the third are much faster, and after a few min that I’m not do anything again the first time is very slow
 

itaym02

New member
time difference between runs=caching

אני אניח שאתה ודע עברית אתה בטוח שהטבלה שלך מנורמלת היטב? אם כן, תבודד את העמודות לכאלו שמשתמשים בהם הרבה ולכאלו שלא, ותחלק לטבלאות שונות. אך דבר ראשון, תוודא שהנירמול שלך טוב.
 

itaym02

New member
אני מאמין שראיתי מאמרים במאמרי הפורום

וכל גיגול על database normalization יתן לך הרבה חומר על הנושא. הנה דוגמה: טבלת עובדים והמחלקות בהן הם עובדים (דוגמה לטעות) שלמה מכירות הרצל מכירות ברוך מחקר ופיתוח שמגר נקיון תותו מחקר ופיתוח גיגי ניהול איך כדאי שיהיה: מזהה שם מזהה מחלקה 1 שלמה 1 2 הרצל 1 3 ברוך 2 4 שמגר 3 5 תותו 2 6 גיגי 4 מזהה מחלקה שם מחלקה 1 מכירות 2 מחקר ופיתוח 3 נקיון 4 ניהול
 

ברק קרב

New member
לא ידעתי שקוראים לזה נירמול :)

ובכלל, נירמול יותר מזכיר את נרמל, החתול שגארפילד שונא. (!)
 
למעלה