473,625 Members | 2,658 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Application performance decrease after deleting rows

Hi, thank you for your help.
My VB.Net application contains a document that the user can refresh at any
time.
The refresh works fine and needs to loop through few datatables (hundreds of
rows). This works fine until I delete some rows in two tables. Just after the
delete if I do the refresh there is a huge memory allocated and the time
needed to perform the refresh increase, the memory and time continue to
increase on each refresh until I save and force garbage collector, after the
GC the memory return to its normal size. I cheked using analysis tool and the
rows that allocated huge memory are 'select' commands and I have no idea how
to solve this problem (the only choice I have is to save and force GC). My
dataset contains only about 20 datatables and few hundreds of rows. I guess
there is a problem with the select after the delete it seems allocating huge
memory.
Thanks
Nov 13 '06 #1
8 1872
Nadir,

Every time there are a lot of messages about the taskmanager showing a hugh
amount of memory.

Be aware that the taskmanager is not correct giving memory, while on the
other hand there is no need to be afraid as there is still enough memory.

If you really want to investigate this for whatever reason, than use other
tools. If you search the newsgroup dotnet general for that you find tons of
messages about this.

Cor

"NAdir" <NA***@discussi ons.microsoft.c omschreef in bericht
news:C4******** *************** ***********@mic rosoft.com...
Hi, thank you for your help.
My VB.Net application contains a document that the user can refresh at any
time.
The refresh works fine and needs to loop through few datatables (hundreds
of
rows). This works fine until I delete some rows in two tables. Just after
the
delete if I do the refresh there is a huge memory allocated and the time
needed to perform the refresh increase, the memory and time continue to
increase on each refresh until I save and force garbage collector, after
the
GC the memory return to its normal size. I cheked using analysis tool and
the
rows that allocated huge memory are 'select' commands and I have no idea
how
to solve this problem (the only choice I have is to save and force GC). My
dataset contains only about 20 datatables and few hundreds of rows. I
guess
there is a problem with the select after the delete it seems allocating
huge
memory.
Thanks

Nov 14 '06 #2
On Nov 14, 5:53 am, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
wrote:
Nadir,

Every time there are a lot of messages about the taskmanager showing a hugh
amount of memory.

Be aware that the taskmanager is not correct giving memory, while on the
other hand there is no need to be afraid as there is still enough memory.

If you really want to investigate this for whatever reason, than use other
tools. If you search the newsgroup dotnet general for that you find tons of
messages about this.
Cor, explain why you think task manager does not correctly report
memory usage. If you compare it to perfmon you'll see that it does.
Perhaps the problem is that you do not know how to interpret the
information displayed.

Nov 14 '06 #3
or the question asked ...

the OP asked for possible solutions as to why the delete causes lags and
increased memory usage when using a refresh ... not does the task manager
report accurately ... and as far as I know ... the task managers works just
fine for this!.
"Hugh Janus" <my************ *@hotmail.comwr ote in message
news:11******** **************@ k70g2000cwa.goo glegroups.com.. .
On Nov 14, 5:53 am, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
wrote:
>Nadir,

Every time there are a lot of messages about the taskmanager showing a
hugh
amount of memory.

Be aware that the taskmanager is not correct giving memory, while on the
other hand there is no need to be afraid as there is still enough memory.

If you really want to investigate this for whatever reason, than use
other
tools. If you search the newsgroup dotnet general for that you find tons
of
messages about this.

Cor, explain why you think task manager does not correctly report
memory usage. If you compare it to perfmon you'll see that it does.
Perhaps the problem is that you do not know how to interpret the
information displayed.

Nov 14 '06 #4
There is a huge memory allocated after deleting rows and executing select
command, this is not normal because not only memory increase in subsequent
refreshs but also the execution time increase. I checked with dev partner
studio and found that I need to save my document (including the data set)
then execute a GC.collect, this will bring the memory to its normal size.
Executing CG.collect without prior save does not free memory. I suspect
something with ADO .NET commands (what happens after executing delete rows
then select).

"jeff" wrote:
or the question asked ...

the OP asked for possible solutions as to why the delete causes lags and
increased memory usage when using a refresh ... not does the task manager
report accurately ... and as far as I know ... the task managers works just
fine for this!.
"Hugh Janus" <my************ *@hotmail.comwr ote in message
news:11******** **************@ k70g2000cwa.goo glegroups.com.. .
On Nov 14, 5:53 am, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
wrote:
Nadir,

Every time there are a lot of messages about the taskmanager showing a
hugh
amount of memory.

Be aware that the taskmanager is not correct giving memory, while on the
other hand there is no need to be afraid as there is still enough memory.

If you really want to investigate this for whatever reason, than use
other
tools. If you search the newsgroup dotnet general for that you find tons
of
messages about this.
Cor, explain why you think task manager does not correctly report
memory usage. If you compare it to perfmon you'll see that it does.
Perhaps the problem is that you do not know how to interpret the
information displayed.


Nov 14 '06 #5
A pity Jeff, that it is a very known issue.

http://groups-beta.google.com/group/...rch+this+group

Cor

"jeff" <jhersey at allnorth dottt comschreef in bericht
news:O4******** ******@TK2MSFTN GP03.phx.gbl...
or the question asked ...

the OP asked for possible solutions as to why the delete causes lags and
increased memory usage when using a refresh ... not does the task manager
report accurately ... and as far as I know ... the task managers works
just fine for this!.
"Hugh Janus" <my************ *@hotmail.comwr ote in message
news:11******** **************@ k70g2000cwa.goo glegroups.com.. .
>On Nov 14, 5:53 am, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
wrote:
>>Nadir,

Every time there are a lot of messages about the taskmanager showing a
hugh
amount of memory.

Be aware that the taskmanager is not correct giving memory, while on the
other hand there is no need to be afraid as there is still enough
memory.

If you really want to investigate this for whatever reason, than use
other
tools. If you search the newsgroup dotnet general for that you find tons
of
messages about this.

Cor, explain why you think task manager does not correctly report
memory usage. If you compare it to perfmon you'll see that it does.
Perhaps the problem is that you do not know how to interpret the
information displayed.


Nov 14 '06 #6
TP
You didn't mention which version of the framework you are
using. Check this article to see if it applies to you:

FIX: The DataTable.Selec t method leaks memory from the index
when you set some specific filter properties

http://support.microsoft.com/kb/814470

Please post your code so that we can see what you are doing.

Also, be aware that a datatable.selec t creates indexes as needed
on the fly, and in .NET 2.0 it discards them after the call completes.
If it needs to create indexes each time this will lead to slower
performance and increased memory pressure.

You may want to experiment with using a dataview instead.

Thanks.

-TP

NAdir wrote:
There is a huge memory allocated after deleting rows and executing
select command, this is not normal because not only memory increase
in subsequent refreshs but also the execution time increase. I
checked with dev partner studio and found that I need to save my
document (including the data set) then execute a GC.collect, this
will bring the memory to its normal size. Executing CG.collect
without prior save does not free memory. I suspect something with ADO
.NET commands (what happens after executing delete rows then select).

Nov 14 '06 #7
TP
Many of the past posts regarding the task manager can
be misleading. People could get the false impression
that task manager is "defective" or that the numbers it
shows are "meaningles s".

It seems to me that things in the group have degraded to:

1. Person asks question regarding leak or possible
high memory use/performance problem

2. Knee-jerk response of "Are you looking at Task
Manager--forget that, it is wrong anyway. Besides,
today's machines have tons of RAM, who cares?"

This is not a good approach, because high memory
use and/or leaks can cause performance problems and
errors, even on machines with relatively large amounts
of RAM. It is important to remember that an app
may be used under terminal services, in which case
sloppy memory/resource use issues are multiplied.

Task manager displays a number of performance
counters in an easy to use format. It displays the correct
values of these performance counters, just as it did *long*
before the first .NET application existed.

What it doesn't show, and never has shown, is the amount
of memory sharing that is occuring, how much of allocated
memory has recently been touched by the process, the
minimum working set that each process requires to perform
well, how much of allocated memory is resident, etc.

Task manager can be very helpful in detecting substantial
memory leaks in .NET apps. For example, it is easy to
create a winforms app with a leak and then use taskman to
view an ever-increasing amount of private bytes (VM Size)
allocated. It is not helpful for very small leaks, for example,
4 bytes every once in a while.

I would strongly recommend that you and anyone else who
would like to understand memory management under windows
read chapter 7 of Windows Internals, by Mark Russinovich &
David Solomon:

http://www.amazon.com/Microsoft-Wind...dp/0735619174/

-TP

Cor Ligthert [MVP] wrote:
A pity Jeff, that it is a very known issue.

http://groups-beta.google.com/group/...rch+this+group

Cor
Nov 14 '06 #8
Thank you TP,
I could not publish my code because it is long and I use the select is
multiple
subroutines. Your suggestion about the problem with SELECT index maybe the
right problem. I was thinking about a problem with the SELECT OR DELETE
COMMANDS. I will experiement and publish the code. As I described in previous
post: using devPartner software, the test shown a problem with the select
after deleting datatable rows, the memory increase about 20 Mb and time of
executing next selects increases, only after executing accpet changes on the
dataset and GC.collect the memory and time become normal. Thanks again this
was a big issue for my application performance.

"TP" wrote:
Many of the past posts regarding the task manager can
be misleading. People could get the false impression
that task manager is "defective" or that the numbers it
shows are "meaningles s".

It seems to me that things in the group have degraded to:

1. Person asks question regarding leak or possible
high memory use/performance problem

2. Knee-jerk response of "Are you looking at Task
Manager--forget that, it is wrong anyway. Besides,
today's machines have tons of RAM, who cares?"

This is not a good approach, because high memory
use and/or leaks can cause performance problems and
errors, even on machines with relatively large amounts
of RAM. It is important to remember that an app
may be used under terminal services, in which case
sloppy memory/resource use issues are multiplied.

Task manager displays a number of performance
counters in an easy to use format. It displays the correct
values of these performance counters, just as it did *long*
before the first .NET application existed.

What it doesn't show, and never has shown, is the amount
of memory sharing that is occuring, how much of allocated
memory has recently been touched by the process, the
minimum working set that each process requires to perform
well, how much of allocated memory is resident, etc.

Task manager can be very helpful in detecting substantial
memory leaks in .NET apps. For example, it is easy to
create a winforms app with a leak and then use taskman to
view an ever-increasing amount of private bytes (VM Size)
allocated. It is not helpful for very small leaks, for example,
4 bytes every once in a while.

I would strongly recommend that you and anyone else who
would like to understand memory management under windows
read chapter 7 of Windows Internals, by Mark Russinovich &
David Solomon:

http://www.amazon.com/Microsoft-Wind...dp/0735619174/

-TP

Cor Ligthert [MVP] wrote:
A pity Jeff, that it is a very known issue.

http://groups-beta.google.com/group/...rch+this+group

Cor

Nov 15 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
7851
by: rishi | last post by:
Looking for tips on how to improve performance on deleting records. In our database we do dataloads daily that require us to purge millions of records a day so any improvement in speed would be welcomed. CREATE OR REPLACE PROCEDURE ETL_CUSTATTRIB_STGTOTRG_ALT1v2 AS TYPE cust_t IS TABLE OF customer_master.customer_id%TYPE INDEX BY BINARY_INTEGER; TYPE attrib_t IS TABLE OF attribute_master.attribute_id%TYPE
3
6894
by: Joachim Klassen | last post by:
Hi all, first apologies if this question looks the same as another one I recently posted - its a different thing but for the same szenario:-). We are having performance problems when inserting/deleting rows from a large table. My scenario: Table (lets call it FACT1) with 1000 million rows distributed on 12
5
7172
by: Gavin Scott | last post by:
Hi, I'm having a performance problem with a large database table we use with postgres 7.3.4. The table is: db=> \d log Table "public.log" Column | Type | Modifiers ---------+----------+----------- hid | integer |
12
3050
by: bernhard.willems | last post by:
We are using DB2 UDB version 8.1 fp7 & fp9 on AIX 5.2. On our databases we do massive inserts and deletes (millions of rows). The performance is dramatically reduced because of pseudo deleted keys. In a 10 minutes it goes from 18000 transaction per minute to 9000 and lower. When an index reorg with CLEANUP ONLY PAGES is executed, the number of transactions climbs again. But a few minutes later it drops again to 9000. We have to run the...
22
6252
by: Jordan S. | last post by:
SQL Server will be used as the back-end database to a non trivial client application. In question is the choice of client application: I need to be able to speak intelligently about when one client (MS Access vs ..NET Windows Forms) would be preferred over the other. While I have some good arguments on both sides, I would appreciate your points of view on the topic.
7
6547
by: P. Adhia | last post by:
Sorry for quoting an old post and probably I am reading out of context so my concern is unfounded. But I would appreciate if I can get someone or Serge to confirm. Also unlike the question asked in the post below, my question involves non-partitioned table loads. I want to know if, in general, loading from cursor is slower than loading from a file? I was thinking cursor would normally be faster, because of DB2's superior buffer/prefetch...
4
1284
by: Cray | last post by:
Hello, On the database we have stored procedure that loads couple thousands rows with information, it has to be done sequentially because during this load various variables and values has to be changed and modified. We have about 10000 rows to process every day - usually it takes about 1 hour.
2
1599
by: rAinDeEr | last post by:
Hi, I have a table with the following definition. The primary key is west_nme and west_eff_tms and i have created unique index on them. The foreign keys which reference other parent tables are west_typ_cde,r_cde,ccl_cde and t_cde and I have created indexes FK_t_west01,FK_t_west02,FK_t_west03 respectively. Now, all the other fields in this table participate in the WHERE clause
5
1399
by: psbasha | last post by:
Hi, Initially when I started programming with the basic functionality of the application,it was taking less time for the application to get executed ( say ~2 Min).Now as the functionality is getting complex and more generic,the application is taking more time to get executed ( ~ 45 Mins). I am playing with list,tuples,dictionaries for storing/retriving the data from the files. I am not user what are the factors which are making to...
0
8182
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8688
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8352
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8494
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7178
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6115
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4085
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1496
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.