Reply
Database interview Question.PLz Help
Old 08-21-2006, 02:17 AM Database interview Question.PLz Help
Junior Talker

Posts: 1
Name: Bibin Jose
Hai,

I am new to this Group.I had an interviw and i got this question.if any one knows plz help.

You are using an SQL query in your program.Your code and SQL Query is working fine.The problem is the loop you are having the query is taking more time to execute.Your project leader saws this and says "Code should not take this much time for executing data to the screen". What will you reply?

With Regards,
Bibin Jose.
bibinjose82 is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 08-23-2006, 06:03 PM Re: Database interview Question.PLz Help
yoemanspiffy's Avatar
Experienced Talker

Posts: 42
I would answer: of the SQL query is as optimized as it can get and operating under set parameters, and the code loop is as optimized as it can get and operating under the described parameters, my answer would be 'Sit on it Potsie!'

No, seriously. if you have the SQL call as optimized as you can get it (ie reducing the necessity for as much looping as possible), and your code is good, then the answer is : slow and correct is always better than fast and wrong. The raw answer to the project leader of course is: That depends on what the business requirements of the code are.

Perhaps there is a bandwidth issue, you might be testing on a dog of a machine, or operating under reduced system resources. Who knows, the server might be a turd. You might have a virus on the client or server machines.

You might try paging your data, flushing after each line written, but given the question parameters there is not a whole lot you will be able to do if your SQL and code are correct and optimized.

I would also look at the code in Query Analyzer (on SQL server) to see the execution plan, test it on another client or server box.

Been there, done that. The PM has a case of RCI (Rectal Cranial Inversion)

YM
__________________
My grandfather used to work for your grandfather. Of course the rates have gone up.

http://www.goldentechinc.com
yoemanspiffy is offline
Reply With Quote
View Public Profile Visit yoemanspiffy's homepage!
 
Old 08-25-2006, 11:39 AM Re: Database interview Question.PLz Help
saadatshah's Avatar
Extreme Talker

Posts: 216
Name: Syed Saadat Ali
Location: Lahore, Pakistan
Interviews reveals much n much somtimes informative sometimes stupid :P
__________________
Traffic School - Driver Ed - Defensive Driving - Texas Defensive Driving - Online Traffic School - Defensive Driving Course
If you have knowledge, let others light their candles in it.
saadatshah is offline
Reply With Quote
View Public Profile Visit saadatshah's homepage!
 
Reply     « Reply to Database interview Question.PLz Help
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11409 seconds with 12 queries