Click here to Skip to main content
15,905,028 members
Home / Discussions / Database
   

Database

 
AnswerRe: This May Be A Stupid Question But... Pin
Peter_in_278030-Jul-10 21:58
professionalPeter_in_278030-Jul-10 21:58 
AnswerRe: This May Be A Stupid Question But... Pin
Jörgen Andersson30-Jul-10 23:40
professionalJörgen Andersson30-Jul-10 23:40 
GeneralRe: This May Be A Stupid Question But... Pin
Roger Wright31-Jul-10 4:34
professionalRoger Wright31-Jul-10 4:34 
AnswerRe: This May Be A Stupid Question But... Pin
PIEBALDconsult31-Jul-10 10:22
mvePIEBALDconsult31-Jul-10 10:22 
AnswerRe: This May Be A Stupid Question But... Pin
Corporal Agarn2-Aug-10 9:55
professionalCorporal Agarn2-Aug-10 9:55 
GeneralRe: This May Be A Stupid Question But... Pin
Roger Wright2-Aug-10 17:18
professionalRoger Wright2-Aug-10 17:18 
GeneralRe: This May Be A Stupid Question But... Pin
Roger Wright3-Aug-10 20:16
professionalRoger Wright3-Aug-10 20:16 
Questionquery takes long time! Pin
Jassim Rahma30-Jul-10 4:34
Jassim Rahma30-Jul-10 4:34 
I am using this code on SQL Server Expess as stored procedure. The icd_disease has 12,000 records but with LEFT(icd_code, 1) = 'R' it’s just 400 records. Then why it takes more than 40seconds to bind into grid control although I ave already indexed the icd_code and icd_description field

SELECT icd_diseases.icd_id, icd_diseases.icd_code, icd_diseases.icd_description
FROM icd_diseases 
WHERE LEFT(icd_code, 1) = 'R'
ORDER BY icd_description, icd_code


This is my binding code

data_table = new DataTable();

sql_connection = new SqlConnection((string)public_var._system_parameters_hash["SQL_SERVER_CONNECTION"]);

sql_connection.Open();
sql_command = new SqlCommand("sp_get_all_symptoms", sql_connection);
sql_command.CommandType = CommandType.StoredProcedure;
sql_adapter = new SqlDataAdapter(sql_command);
sql_adapter.Fill(data_table);
dataSymptoms.DataSource = null;
dataSymptoms.ResetBindings();
dataSymptoms.DataSource = data_table;

gridSymptoms.Columns["icd_id"].Caption = "icd_id#";
gridSymptoms.Columns["icd_id"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
gridSymptoms.Columns["icd_id"].AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
gridSymptoms.Columns["icd_id"].Visible = false;

gridSymptoms.Columns["icd_code"].Caption = "icd_code#";
gridSymptoms.Columns["icd_code"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
gridSymptoms.Columns["icd_code"].AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
gridSymptoms.Columns["icd_code"].Visible = false;

gridSymptoms.Columns["icd_description"].Caption = "Symptom";
gridSymptoms.Columns["icd_description"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Default;
gridSymptoms.Columns["icd_description"].AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Default;
gridSymptoms.Columns["icd_description"].Width = 420;

AnswerRe: query takes long time! Pin
dan!sh 30-Jul-10 4:49
professional dan!sh 30-Jul-10 4:49 
AnswerRe: query takes long time! Pin
Eddy Vluggen30-Jul-10 5:07
professionalEddy Vluggen30-Jul-10 5:07 
GeneralRe: query takes long time! Pin
Jassim Rahma30-Jul-10 5:43
Jassim Rahma30-Jul-10 5:43 
GeneralRe: query takes long time! Pin
Eddy Vluggen30-Jul-10 6:04
professionalEddy Vluggen30-Jul-10 6:04 
GeneralRe: query takes long time! Pin
David Skelly30-Jul-10 6:12
David Skelly30-Jul-10 6:12 
GeneralRe: query takes long time! Pin
Eddy Vluggen30-Jul-10 6:29
professionalEddy Vluggen30-Jul-10 6:29 
AnswerRe: query takes long time! Pin
PIEBALDconsult30-Jul-10 19:13
mvePIEBALDconsult30-Jul-10 19:13 
QuestionRetrieve the value from Dynamic Sql Pin
.NET- India 30-Jul-10 2:36
.NET- India 30-Jul-10 2:36 
AnswerRe: Retrieve the value from Dynamic Sql Pin
dan!sh 30-Jul-10 3:12
professional dan!sh 30-Jul-10 3:12 
QuestionSelecting Recent row Pin
T.RATHA KRISHNAN30-Jul-10 1:41
T.RATHA KRISHNAN30-Jul-10 1:41 
AnswerRe: Selecting Recent row Pin
R. Giskard Reventlov30-Jul-10 1:43
R. Giskard Reventlov30-Jul-10 1:43 
GeneralRe: Selecting Recent row Pin
T.RATHA KRISHNAN30-Jul-10 1:52
T.RATHA KRISHNAN30-Jul-10 1:52 
GeneralRe: Selecting Recent row Pin
R. Giskard Reventlov30-Jul-10 1:55
R. Giskard Reventlov30-Jul-10 1:55 
AnswerRe: Selecting Recent row Pin
Chris Meech30-Jul-10 1:51
Chris Meech30-Jul-10 1:51 
AnswerRe: Selecting Recent row Pin
Roger Wright30-Jul-10 20:21
professionalRoger Wright30-Jul-10 20:21 
QuestionMaking with values of two rows, two entries in a new table. Pin
neus8330-Jul-10 1:17
neus8330-Jul-10 1:17 
AnswerRe: Making with values of two rows, two entries in a new table. Pin
Corporal Agarn30-Jul-10 6:09
professionalCorporal Agarn30-Jul-10 6:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.