|
I have an application (C#/ADO.NET) that collects alarms from equipment at around 100 sites, through concurrent TCP/IP listeners. Per day I receive about 1 million messages (~10/sec). I used to insert the directly into the destination table, but that would lock up the table so user access (read/reporting) was hardly possible. Now I insert the data in a intermediate table and upload it every 5 min. to the final table with SQl agent.
First of all, this doesn't look like an elegant solution. Furthermore, performance is still quite bad. Even though I have just this one DB/table, SQL-server uses up all available memory (1.5Gb out of 2Gb) and all available CPU, 24x7; I'm just wainting for a melt-down...
Anybody have any experience with this amount of transactions, and/or any suggestions?
Thanks.
|
|
|
|
|
CPU should not be high on the SQL box for data inserts. Check that your inserts are as efficient as possible:
* avoid INSERT ... WHERE ... statements
* avoid clustered index (good for selecting, often bad for inserting)
* minimize the number of indexes on the tables you insert to
Regarding memory usage, SQL tends to do that (grab as much memory as it can), it does not necessarily mean anything. However, it is worthwhile checking that you have appropriate indexes for the user-reporting and other reads are optimized.
my blog
|
|
|
|
|
Hi
I am looking for a convertor. It must be able to convert a numeric range to a regular expression string.
I searched the internet but I could not find a one. I do not have time to write from scratch.
Do you know such a code?
Thanks
|
|
|
|
|
hi,
You mean you want the minimum to the selected numer into a string or ?. Will you explain little more ?
Sreejith Nair
|
|
|
|
|
Hi
I want to enter a minimum value and a maximum value as the input.
Ex:3-55
Then I want an output as regular expresion like ([3-9]|[1-4][0-9]|5[0-5])
Thanks
|
|
|
|
|
When using the richtextbox control there is an intense amount of flickering. It is especially noticeable after an image is pasted into it.
I have tried using the ControlStyles to take advantage of double buffering, but I am not able to successfully paint the text and images properly.
Any help would be greatly appreciated.
Thank you in advacne.
JB
|
|
|
|
|
hi,
If you are calling the Invalidate() function of base form then it will invalidate the entire region of the form. Better try to Invalidate the your RichTextBox
<blink>S r e e j i t h N a i r
|
|
|
|
|
The problem is not about calling Invalidate() on the base form or for that matter on the Richtextbox itself.
To see what I am talking about, create a WinForm application and add a RichTextBox to the form. Compile the application and run it.
Start typing into the richtextbox. Then paste an image into it. Then continue typing on the line below or above the pasted image. The flicker is unbearable.
If someone can give me some direction on overriding the OnPaint(PaintEventArgs pe) event to be able to successfully paint complex data, it would be helpful and very much appreciated.
Thank you.
|
|
|
|
|
hello guys
i have made a collection class which contains some properties like bitmaps and rects.
the problem is , when i create an object of this class i want a collection property like an imagelist's Collection in property editor. any one having idea how can i achieve it.
thanx
|
|
|
|
|
hi,
If you are looking for collection iteration or accessing then what you need to do is, Impliment IEnumerable,IEnumerator interfaces in your collection class. If you want more help and explanation . Then please refer my article on IEnumerable and IEnumerator. thanks
<blink>S r e e j i t h N a i r
|
|
|
|
|
i had alredy implement IEnumeable interface but the problem is, i can't made it's property just like an ImageList control's collection property.
thanx
|
|
|
|
|
i would like to know how i can make the string some more small strings
like string x = "i like it" then string y = "i" & string z = "like"
& string m = "it" i tried the subroutin "subString()" but i gives an error "unknown method"
|
|
|
|
|
hi,
string is immutable in nature so you don't want to worry about the new string instance. Substring() method of a string class is used to extract a part of string from the given string.
<blink>S r e e j i t h N a i r
|
|
|
|
|
hi
when i use it SubString() it gives error "unknown property or method"
|
|
|
|
|
Moustafa_C# wrote:
string x = "i like it"
try the following
string[] xyz = x.Split(' ');
xyz will then be an array of 3 strings.
Kev
|
|
|
|
|
hi
so what is that x.Split(' ')
dimentions or what
|
|
|
|
|
hi,
Split methos will split the entire string into different parts. Here a space is mentioned. So it will split the whole string where ever it found a space.
Eg: string a ="i am @ fine i@f you@ care me";
string[] col=a.Split('@');
so the result values will be.
col[0] is -> i am
col[1] is -> fine i
col[2] is -> f you
col[4] is -> care me
Did u understood ?
Sreejith Nair
|
|
|
|
|
I dont understand what your asking but i'll try to explain a bit more.
x is you string which currently equals "I Like It"
x.Split(); returns an array of strings and it requires a char parameter.
The char is the "Seperator" that you want to use to split your string with.
In the example you used in your original post that character would be a space ' '.So..
string[] myString = x.Split(' ');
makes myString into a 3 string array.
myString[0] will equal "I"
myString[1] will equal "Like"
myString[2] will equal "IT"
Hope that is what you were asking but your question didn't make sense.
If you need any mroe help then just ask.
Cheers
Kev
|
|
|
|
|
|
Colin Angus Mackay wrote:
You mean "Separator"
;P;P;P;P
Kev
|
|
|
|
|
hi,
i want say one example for this question. take an example. 100 % of person's are studying the syntax of any language. But 75 % are really catching the ideas. In the above 75 %, 35 % got the full syntax structure and everything. And in 35 % how many pesons know 'where i will apply this'. so now you are in 35 %.
This is one of a bad posting of a programmer to ask someone give me any idea to do something.
See, if you don't have a clear picture of usage that what you learned. Then it is too very bad to know.
Today someone may help you out. But in your professional life who will help you out ?
Use your brain and extract some creating idea's and try to analyse it,design it, and then get into coding. Now you may face lot of difficulties to achive your design. Then come to code project and post it. You will get real support. Try to think. Don't take this as screwing.
<blink>S r e e j i t h N a i r
|
|
|
|
|
Well, not that I see. The original poster is asking for example exercises to help fine tune his knowledge of C#. In a professional position there would be a project with definite goals, the problem here is that the original poster has no specific project type goals only to fine tune his knowledge. So at the moment the fine tuning exercise isn't going anywhere because it has nowhere to go.
That's my understanding anyway.
Do you want to know more?
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
Okay, what are your goals? Why did you start learning C#? Was it to get a better job? Or just for fun?
If it was to get a job then what type of job do you want? Do you want to develop business applications? Or games? Are you more interested in the internals of an application? Or the user interface?
If it was for fun then what excites you? What interests you?
If you can answer these questions, I, or someone else on this forum, can probably point you in the right direction.
Do you want to know more?
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
I want to display MHTML files using the IE ActiveX control, but don't want to create temporary files - I want to be able to send the content to the control in memory.
With just HTML this is quite simple - just implement IHTMLDocument2 and use the Open/Write/Close methods, but as IHTMLDocument supports only HTML this of course doesn't work for Mime encoded MHTML documents.
Any ideas?
|
|
|
|
|
Hello,
I want to develop for my own little database on the Desktop which contains one table (5 columns - always nvarchar-types) a replication between PocketPc and Desktop. I have already read the example at
http://www.msdn.microsoft.com/SQL/SQLCE/default.aspx?pull=/msdnmag/issues/03/09/datapoints/default.aspx
and this example also worked when i tried it with my PocketPc and the Desktop but this example is so extensive and all functions are in the same file, so for me it is very incomprehensible.
Can anybody explain what code fragments from this example i actually need to develop the replication for my little database with the one table?
this would be very nice.
thanks in advance.
regards
patrick
|
|
|
|