Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

indexing - Mysql Index is not being used correctly -


i got strange problem simple mysql index.

i got following table:

create table `import` (   `import_id` int(11) not null auto_increment,   `import_title` text,   `import_url` text,   `import_description` text,   `import_completed` enum('y','n') not null default 'n',   `import_user` int(11) default null,   `import_added` timestamp not null default current_timestamp,   primary key (`import_id`),   key `import_added` (`import_added`) ) engine=myisam default charset=utf8; 

in table few thousand rows , want first 100 following select clause:

select    import_id,    import_title,    import_url,    import_description,    import_user,    import_added  import  import_completed = 'n'  order import_added asc  limit 0,100 

when use describe take closer @ query, local machine uses "added" index , returns 100 rows within few milliseconds expected.

when use same database same structure , content on "production" server , use describe there, shows index used well, returns rows in table , query takes 6 seconds.

what missing? why index not working correctly?

wrong usage of index

... key `import_added` (import_completed, import_added) ... 

and query execution plan

desc extended select    import_id,    import_title,    import_url,    import_description,    import_user,    import_added  import  import_completed = 'n'  order import_added asc  limit 0,100; 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -