|
I have made a break through - If I remove the date filter from my where clause on the Stored Proc, the data loads in a under a second (down from 36+ seconds).
The where clause has the following in it...
WHERE (@FromDate IS NULL OR ISNULL(A.[CallOutDateTime], '2900-12-31') >= @FromDate)
AND ((@ToDate IS NULL OR @ToDate = '1900-01-01') OR ISNULL(A.[CallOutDateTime], '1900-01-01') <= @ToDate)
Any ideas on why this would be causing the problem, bearing in mind when I execute the stored proc in SQL Server and pass it the same parameters as my front-end passes it runs in a second also, regardless of if I have the dates in the where cluase)? Bearing this in mind, I know it's not an indexing issue.
|
|
|
|
|
Just put my Dates back into my where clause and it will now load the full record set in a second. Problem solved - Weird! I can only assume that changing the Where and removing the dates forced SQL Server to change the execution plan and putting the dates back used a new execution plan making more efficient use of the indexes. Anyway, speed issue now gone - users happy
|
|
|
|
|
All the best,
Dan
|
|
|
|
|
Mark, glad you worked it out; if you feel charitable, you might post what happened here on on the DevXpress forum for their GridView, since it might help others using that Grid ? Assuming the performance issue had something to do with DevX's Grid, specifically.
best, Bill
When I consider the brief span of my life, swallowed up in the eternity before and after, the little space which I fill, and even can see, engulfed in the infinite immensity of spaces of which I am ignorant, and which knows me not, I am frightened, and am astonished at being here rather than there; for there is no reason why here rather than there, now rather than then. Blaise Pascal
|
|
|
|
|
Hi Bill,
There was no fault with the DevExpress grid (which truly is a stunning control and suite). It appears to have been some weird issue with the SQL Server Stored Proc Execution plan.
|
|
|
|
|
Hi eveybody
I want to convert given string to ıf statment
For Ex
string condition="(a>45 && b<34) || (c>14 && d>56)";
if(condition)
{
//to do smth
}
I try to write my own parser but ıt will be very diffucult because There are lots of conditions can be wrıtten lıke
string cond="a<45&&(b>=56 || c<45)";
strinf con="((a==50 & b>45)||c>56) && e<457";
so How can ı do this ?
Its to important for me please help me ...
|
|
|
|
|
Surely a parser has no trouble with that.
Anyway, since you're only parsing an expression, you could use something slightly simpler than a parser - the Shunting Yard algorithm.
|
|
|
|
|
Looks like lots of C# implementations of this algorithm are out there:[^]
When I consider the brief span of my life, swallowed up in the eternity before and after, the little space which I fill, and even can see, engulfed in the infinite immensity of spaces of which I am ignorant, and which knows me not, I am frightened, and am astonished at being here rather than there; for there is no reason why here rather than there, now rather than then. Blaise Pascal
|
|
|
|
|
That's no easy task.
Here's an article that deals with many if not all of your problems.
It should get you started.
All the best,
Dan
|
|
|
|
|
cacampa wrote: I try to write my own parser but ıt will be very diffucult because There are lots of conditions can be wrıtten
That will always be true for this type of problem.
cacampa wrote: so How can ı do this ?
Either write your own parser or use one of the free tools around. Try a Google search for "parser", "yacc" and "antlr", and you should find lots of useful resources.
cacampa wrote: Its to important for me please help me
Other than suggesting tools and search options there is not much else that we can do for you.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Another solution ... around for a long time ... assuming your working in C# ... is to reference and invoke the JScript library and its 'eval' facility: [^].
Note: I have not used this myself, and it might be "tricky."
When I consider the brief span of my life, swallowed up in the eternity before and after, the little space which I fill, and even can see, engulfed in the infinite immensity of spaces of which I am ignorant, and which knows me not, I am frightened, and am astonished at being here rather than there; for there is no reason why here rather than there, now rather than then. Blaise Pascal
|
|
|
|
|
|
Manfred, please fix the broken url.
|
|
|
|
|
Thanks for pointing that out! I'm quite disturbed by the troubles I'm having with inserting links via my tablet device.
Cheers!
"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925
|
|
|
|
|
Hi,
through Dynamic in C# 4.0 you can achieve this, but you need to investigate it
here is the link i found to execute string in c#
hope this will resolve your problem
thanks
-amit
|
|
|
|
|
Hello ppl....
please i need a help.. i have a c# subject at my university,they give me a bonus marks to make a program (project).. i make some research in the net .. but it was difficult to choose a program to work in it.. and i want some ideas for a programs ..
tkx
|
|
|
|
|
Sounds like the perfect opportunity to make Skynet.
Somebody in an online forum wrote: INTJs never really joke. They make a point. The joke is just a gift wrapper.
|
|
|
|
|
I guess your not getting the bonus points.
No comment
|
|
|
|
|
Well, if there are no stipulations as to the nature or compexity of the project, perhaps Hello World[^]? Where do I queue to get my degree?
|
|
|
|
|
CodeProject badly needs a program to automatically reject bad subject lines. Maybe you could come up with something?
|
|
|
|
|
Luc Pattyn wrote: CodeProject badly needs a program to automatically reject bad subject lines. Could we append to that RFP: "accompanied by 'gimme' content" ?
best, Bill
When I consider the brief span of my life, swallowed up in the eternity before and after, the little space which I fill, and even can see, engulfed in the infinite immensity of spaces of which I am ignorant, and which knows me not, I am frightened, and am astonished at being here rather than there; for there is no reason why here rather than there, now rather than then. Blaise Pascal
|
|
|
|
|
When coming up with a topic like this, it generally helps if it's a subject area that interests you. That way you can keep your enthusiasm high which will help you when you run into areas where you feel stuck. Now we don't know you, so we aren't going to be much help there.
Failing that, write a program that converts gibberish text speak into real English.
|
|
|
|
|
Go here [^]
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
OP did not ask for code or a solution to homework, but was asking for ideas. Asking for ideas is not something that should be looked down upon (at least the way I see it).
Regards,
Manfred
"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925
|
|
|
|
|
Part of the homework assignment was to come up with the idea. If these guys aren't creative enough to even come up with their own ideas, what kind of programmer are they going to be when they graduate? How do they expect to analyze a problem, and document a solution? Development isn't just about writing code.
It doesn't have to be earth shattering, or the all-too-elusive "killer app". It's just a homework assignment. Hell, I've come up with several ideas in the last couple of years and have implemented all of them. CPAM took three weeks to develop from start to finish. Reputationator took three weeks to write (not including the article), and another two weeks for the WPF version). CamoPicker's basic implementation took all of two weeks from start to finish. I've got other examples that would be lost on you because there's no accompanying CP article.
I'm almost positive that he doesn't even have to actually finish the app. In fact, if he just showed some development cycle lifetime work and got MOST of the code implemented, he'd get full credit for it.
I stand by my "we don't do homework for people" post.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|