Query on memory consumption during SQL
Hi SAP Gurus,
Could I kindly request for your inputs concerning the following scenario?
To put it quite simply, we have a program where we're required to retrieve all the fields from a lengthy custom table, i.e. the select statement uses an asterisk. Unfortunately, there isn't really a way to avoid this short of a total overhaul of the code, so we had to settle with this (for now).
The program retrieves from the database table using a where clause filtering only to a single value company code. Kindly note that company code is not the only key in the table. In order to help with the memory consumption, the original developer had employed retrieval by packages (also note that the total length of each record is 1803...).
The problem encountered is as follows:
- Using company code A, retrieving for 700k entries in packages of 277, the program ran without any issues.
- However, using company code B, retrieving for 1.8m in packages of 277, the program encountered a TSV_TNEW_PAGE_ALLOC_FAILED short dump. This error is encountered at the very first time the program goes through the select statement, ergo it has not even been able to pass through any additional internal table processing yet.
About the only biggest difference between the two company codes is the number of corresponding records they have in the table. I've checked if company code B had more values in its columns than company code A. However, they're just the same.
What I do not quite understand is why memory consumption changed just by changing the company code in the selection. I thought that the memory consumed by both company codes should be the same... at least, in the beginning, considering that we're retrieving by packages, so we're not trying to get all of the records all at once. However, the fact that it failed at the very beginning has shown me that I'm gravely mistaken.
Could someone please enlighten me on how memory is consumed during database retrieval?
Thanks!
Hi,
with FAE (FOR ALL ENTRIES) the whole query even for a single record in the itab is executed and all results for
the company code are transfered from the database to the DBI since the duplicates will be removed by the DBI
not by the database.
If you use package size the resultset is buffered in a system table in the DBI (which allocates memory from your user quota). And from there on the package sizes are built and handed over to your application (into table lt_temp).
see recent ABAP documentation:
Since duplicate rows are only removed on the application server, all rows specified using the WHERE condition are sometimes transferred to an internal system table and aggregated here. This system table has the same maximum size as the normal internal tables. The system table is always required if addition PACKAGE SIZE or UP TO n ROWS is used at the same time. These do not affect the amount of rows transferred from the database server to the application server; instead, they are used to transfer the rows from the system table to the actual target area.
What you should do:
calculate the size needed for your big company code B. How many row multiplied with line length.
That is the minimum amount you need for your user memory quota. (quotas can be checked with
ABAP report RSMEMORY) If the amount of memory is sufficient then try without packagesize.
SELECT * FROM <custom table>
INTO TABLE lt_temp
FOR ALL ENTRIES IN lt_bukrs
WHERE bukrs = lt_bukrs-bukrs
ORDER BY primary key.
This might actually use less memory than the package size option for the FOR ALL ENTRIES.
Since with FAE it is buffered anyway in the DBI (and subtracted from your quota) you can
do it right away and avoid double saving portions (the DBI buffer and a portion of that in the
packe in lt_temp).
If the amount of memory is still too big, you have to either increase the quotas or select
less data (additional where conditions) or avoid using FAE in this case in order to not read all
the data in one go.
Hope this helps,
Hermann
Similar Messages
-
Internal memory error during SQL generation. (QP0002)
Post Author: Rajesh Kumar
CA Forum: WebIntelligence Reporting
Hi,
I developed one Report in BO 5.1 version (Report size à 13 MB) and I Migrated this Report to BO XIR2,
After I Migrated this Report to BO XI R2 this Report was worked perfectly in DESKI & also in WEBI
But now for the past few Days (nearly 1 week) this Report is not working in WEBI, but itu2019s perfectly working in DESKI. In WEBI itu2019s showing error message à u201CInternal memory error during SQL generation. (QP0002)u201D
Iu2019m having one PDF documentation for BO Error Messages Listing, in that Documentation I have found the below à
Internal memory error during SQL generation. (QP0002)
Cause This error occurs when there is no longer enough memory to generate the SQL.
Action You should close other applications and then rerun the query.
I tried this alsou2026.
I closed all other applications and I Refreshed this Report, but again the same error is coming in WEBI
Report is working in DESKI but itu2019s not working in WEBI, I donu2019t know how to rectify this problem
Can anyone help me in this to rectify.. please
Thanks in advance
Rajesh KumarHi,
I investigated further and if the previous solution doesn't help you to resolve the issue please test the below mentioned solution.
When several contexts are possible for a query, the system tests if they produce the same set of tables. If they are identical, it is not necessary to prompt the user. It is the default behavior. But for some particular universes, the designer defines different contexts with the same tables, but with a different set of joins. This will compare the context with the joins. When this happens, InfoView fails with this error.
Resolution
1. Import the universe.
2. Modify the following parameter:
COMPARE_CONTEXTS_WITH_JOINS = No
3. Export the universe.
4. Open the Desktop Intelligence report in InfoView and refresh it.
It will refresh successfully
Regards,
Sarbhjeet Kaur -
Internal Memory Error During SQL Generation
Hi,
Please find below the details:
Issue: I am using BO XI R3 DeskI.
When I try to refresh/edit the Dataprovider of a report, it says "Internal Memory Error During SQL Generation"
I am sure that there is no case of Multiple contexts with this report and its a very simple one too.
I get this error in WebI as well
Workaround: Restarting the DesktopIntelligence Processing Server solves the issue for some time but then it reoccurs-for some other report -at a later time.
Could anyone please explain the root cause of this and is there a permanent solution to this problem.
Thanks
Prabhat JhaHi,
I investigated further and if the previous solution doesn't help you to resolve the issue please test the below mentioned solution.
When several contexts are possible for a query, the system tests if they produce the same set of tables. If they are identical, it is not necessary to prompt the user. It is the default behavior. But for some particular universes, the designer defines different contexts with the same tables, but with a different set of joins. This will compare the context with the joins. When this happens, InfoView fails with this error.
Resolution
1. Import the universe.
2. Modify the following parameter:
COMPARE_CONTEXTS_WITH_JOINS = No
3. Export the universe.
4. Open the Desktop Intelligence report in InfoView and refresh it.
It will refresh successfully
Regards,
Sarbhjeet Kaur -
How to measure memory consumption during unit tests?
Hello,
I'm looking for simple tools to automate measurement of overall memory consumption during some memory-sensitive unit tests.
I would like to apply this when running a batch of some test suite targetting tests that exercise memory-sensitive operations.
The intent is, to verify that a modification of code in this area does not introduce regression (raise) of memory consumption.
I would include it in the nightly build, and monitor evolution of summary figure (a-ah, the "userAccount" test suite consumed 615Mb last night, compared to 500Mb the night before... What did we check-in yesterday?)
Running on Win32, the system-level info of memory consumed is known not to be accurate.
Using perfmon is more accurate but it seems an overkill - plus it's difficult to automate, you have to attach it to an existing process...
I've looked in the hprof included in Sun's JDK, but it seems to be targetted at investigating problems rather than discovering them. In particular there isn't a "summary line" of the total memory consumed...
What tools do you use/suggest?However this requires manual code in my unit test
classes themselves, e.g. in my setUp/tearDown
methods.
I was expecting something more orthogonal to the
tests, that I could activate or not depending on the
purpose of the test.Some IDEs display mmeory usage and execution time for each test/group of tests.
If I don't have another option, OK I'll wire my own
pre/post memory counting, maybe using AOP, and will
activate memory measurement only when needed.If you need to check the memory used, I would do this.
You can do the same thing with AOP. Unless you are using an AOP library, I doubt it is worth additional effort.
Have you actually used your suggestion to automate
memory consumption measurement as part of daily builds?Yes, but I have less than a dozen tests which fail if the memory consumption is significantly different.
I have more test which fail if the execution time is siginificantly different.
Rather than use the setUp()/tearDown() approach, I use the testMethod() as a wrapper for the real test and add the check inside it. This is useful as different test will use different amounts of memory.
Plus, I did not understand your suggestion, can you elaborate?
- I first assumed you meant freeMemory(), which, as
you suggest, is not accurate, since it returns "an
approximation of [available memory]"freeMemory gives the free memory from the total. The total can change so you need to take the total - free as the memory used.
- I re-read it and now assume you do mean
totalMemory(), which unfortunately will grow only
when more memory than the initial heap setting is
needed.more memory is needed when more memory is used. Unless your test uses a significant amount of memory there is no way to measure it reliably. i.e. if a GC is perform during a test, you can have the test appear to use less memory than it consumes.
- Eventually, I may need to inlcude calls to
System.gc() but I seem to remember it is best-effort
only (endless discussion) and may not help accuracy.if you do a System.gc(); followed by a Thread.yield() at the start it can improve things marginally. -
I have 24GB of RAM in my 64 bit Windows 7 system running on RAID 5 with an i7 CPU.
A while ago I updated from Premiere CS5 to CC and then from Premiere CC to CC 2014. I updated all my then current projects to the new version as well.
Most of the projects contained 1080i 25fps (1080x1440 anamorphic) MPEG clips originally imported (captured from HDV tape) from a Sony HDV camera using Premiere CS5 or CC.
Memory consumption during re-indexing.
When updating projects I experienced frequent crashes going from CS5 to CC and later going from CC to CC 2014. Updating projects caused all clips in the project to be re-indexed. The crashes were due to the re-indexing process causing excessive RAM consumption and I had to re-open each project several times before the re-index would eventually complete successfully. This is despite using the setting to limit the RAM consumed by Premiere to much less than the 24GB RAM in my system.
I checked that clips played; there were no errors generated; no clips showed as Offline.
Some Clips now Offline:Importer CC 2014
Now, after some months editing one project I found some of the MPEG clips have been flagged as "Offline: Importer" and will not relink. The error reported is "An error occurred decompressing video or audio".
The same clips play perfectly well in, for example, Windows Media Player.
I still have the earlier Premiere CC and the project file and the clips that CC 2014 importer rejects are still OK in the Premiere CC version of the project.
It seems that the importer in CC 2014 has a bug that causes it to reject MPEG clips with which earlier versions of Premiere had no problem.
It's not the sort of problem expected with a premium product.
After this experience, I will not be updating premiere mid-project ever again.
How can I get these clips into CC 2014? I can't go back to the version of the project in Premiere CC without losing hours of work/edits in Premiere CC 2014.
Any help appreciated. Thanks.To answer my own question: I could find no answer to this myself and, with there being no replies in this forum, I have resorted to re-capturing the affected HDV tapes from scratch.
Luckily, I still had my HDV camera and the source tapes and had not already used any of the clips that became Offline in Premiere Pro CC 2014.
It seems clear that the MPEG importer in Premiere Pro CC 2014 rejects clips that Premiere Pro CC once accepted. It's a pretty horrible bug that ought to be fixed. Whether Adobe have a workaround or at least know about this issue and are working on it is unknown.
It also seems clear that the clip re-indexing process that occurs when upgrading a project (from CS5 to CC and also from CC to CC 2014) has a bug which causes memory consumption to grow continuously while it runs. I have 24GB RAM in my system and regardless of the amount RAM I allocated to Premiere Pro, it would eventually crash. Fortunately on restarting Premiere Pro and re-loading the project, re-indexing would resume where it left off, and, depending on the size of the project (number of clips to be indexed), after many repeated crashes and restarts re-indexing would eventually complete and the project would be OK after that.
It also seems clear that Adobe support isn't the greatest at recognising and responding when there are technical issues, publishing "known issues" (I could find no Adobe reference to either of these issues) or publishing workarounds. I logged the re-index issue as a bug and had zero response. Surely I am not the only one who has experienced these particular issues?
This is very poor support for what is supposed to be a premium product.
Lesson learned: I won't be upgrading Premiere again mid project after these experiences. -
B1IF Memory consumption and SQL Release
Hi All,
the problem i have at the moment is that SQL does not seem to release any memory of B1IF Transactional/SQL Query related usage.
Our 1 client is set on 40gb ram, 28gb of that is used by SQL alone of which about 16 is SAP B1 Relating and the rest is due to B1IF Transactions and queries.
It seems like SQL does not release any memory, several posts i have come across relate only to memory management for B1IF(Tomcat6). but i cant seem to find anything relating to B1IF's SQL side Memory usage and ways to limit or recycle the unused memory.
this is causing our customers systems to start lagging and slowing down in general.
Any help with this problem would be greatly appreciated.
Thanks,
GideonHi Gideon
AFAIK you don't manage the SQL Server's memory usage on application basis. In other words: SQL Server knows best how much memory to use and how much each application should consume. In order to help your OS you should set max memory usage for SQL Server:
SQL Server not releasing memory after query executes - Stack Overflow
Kind regards,
Radek -
Query on Memory consumption of an object
Hi,
I am able to get information on the number of instances loaded, the memory occupied by those instances using heap histogram.
Class Instance Count Total Size
class [C 10965 557404
class [B 2690 379634
class [S 3780 220838
class java.lang.String 10807 172912 Is there way to get detailed info like, String object of which class consume much memory.
In other words,
The memory consumption of String is 172912. can I have a split up like
String Objects of Class A - 10%
String Objects of Class B - 90%
ThanksI don't know what profiler you are using but many memory profilers can tell you where the strings are allocated.
-
I have a query that returns about 10MB worth of data when run against my db -- it looks something like the following
'for $doc in collection("VcObjStore")/doc
where $doc[@type="Foo"]
return <item>{$doc}</item>'
when I run this query in dbxml.exe, I see memory footprint (of dbxml.exe) increase 125MB. Once query finishes, it comes back down.
I expected memory consumption to be somewhat larger than what the query actually returns but this seems quite extreme.
Is this behavior expected? What is a general rule of thumb on memory usage with respect to result size (is it really 10x)? Any way to make it less of a hog?
ThanksHi Ron,
Thanks for a quick reply!
- I wasn't actually benchmarking DBXML. We've observed large memory consumption during query execution in our test application and verified the same issue with dbxml.exe. Since dbxml.exe is well understood by everyone familiar with DBXML, I thought it would help starting with that.
- Yes, an environment was created for this db. Here is the code we used to set it up
EnvironmentConfig envConfig = new EnvironmentConfig();
envConfig.setInitializeLocking(true);
envConfig.setInitializeCache(true);
envConfig.setAllowCreate(true);
envConfig.setErrorStream(System.err);
envConfig.setCacheSize(1024 * 1024 * 100);
- I'd like an explanation on reasons behind the performance difference between these two queries
Query 1:
dbxml> time query 'for $doc in collection("VcObjStore")/doc
where $doc[@type="VirtualMachine"]
return $doc'
552 objects... <snip>
Time in seconds for command 'query': 0.031
Query 2:
dbxml> time query 'for $doc in collection("VcObjStore")/doc
where $doc[@type="VirtualMachine"]
return <val>{$doc}</val>'
552 objects... <snip>
Time in seconds for command 'query': 5.797
- Any way to make the query #2 go as fast as #1?
Thanks! -
Hi,
Need some expert in SQL here. May i know how much memory (RAM) consumption for a simple query like 'SELECT SUM(Balance) FROM OCRD' cost.
What about query like
select (select sum(doctotal) from ordr) + (select sum(doctotal) from odln) + (select sum(doctotal) from oinv)
How much memory would it normally takes? The reason is that i have a query that is quite similar to this and it would be run quite often. So i wonder if it is feasible to use this type of queries withought making the server to a crawl.
Please note that the real query would include JOINS and such. Thanks
Any information is appreciatedHi Melvin,
Not sure I'd call myself an expert but I'll have a go at an answer
I think you are going to need to set up a test environment and then stress test your solution to see what happens. There are so many different variables that affect the memory consumption that no-one is likely to be able to say just what the impact will be on your server. SQL Server, by default will allocate 1024Kb to each query but, of course, quite a number of factors will affect whether SQL needs more memory than this to execute a particular query (e.g. the number of joins, the locks created, whether the data is grouped or sorted, the size of the data etc etc). Also, SQL will release memory as soon as it can (based on its own algorithms) so a query that is run periodically has much less impact on the server than a query that will be run concurrently by multiple users. For these reasons, the impact can only really be assessed if you test it in a real-world scenario.
If you've ever seen SQL Server memory usage when XL Reporter is running a very large report then you'll know that this is a very memory hungry operation. XL Reporter bombards SQL with a huge number of separate little queries and SQL Server starts grabbing significant amounts of memory to fulfill these queries. As the queries are coming so fast, SQL hasn't yet got around to releasing the memory used by previous queries so SQL instead grabs available memory from the server.
You'll get better performance and scaleability by using stored procedures but SDK certification does not allow the use of SPs in the SBO databases.
Hope this helps,
Owen -
SQL Developer High Memory Consumption 3.2.20.09.87
Hello,
I have been using SQL developer for quite some time and had initially had problems in the past with high memory consuption when I use this tool.
I have received and applied advice from this forum and while it had helped a little, the majority of the high memory consuption remained an issue.
I finally got more time to dig around and try to specifically isolate where the problem seems to be coming from and here is what I found.
*1)* I have removed the Check for Updates feature
*2)* I have turned off many of the extensions except for DBA Navigator, Real Time SQL Monitoring, SearchBar and Snippet.
*3)* When I start a fresh SQL Developer Session and initiate a Oracle Connection the application consumes roughly 148 meg fo RAM
*4)* When I open my Windows Task Manager and watch the memory allocated to SQL Developer I notice it goes up when I move my mouse over the SQL Developer tool and When I run through menus at roughly 5k a second or so and the memory is never released back to the system.
*5)* When I run a Large SQL to the grid the memory jumps by about 100 meg or so and will continue to do so every time I repeat the SQL until SQL Developer consumes roughly 748 meg of RAM.
*6)* 748 Meg of RAM seems to be the number when SQL Developer (with one Oracle connection) no longer continues to consume more and then not return the memory to the system.
Is there a way to have SQL Developer automatically clear up it's active memory usage without closing it down and restarting it?
Why does SQL Developer continue to consume more and more memory just from moving your mouse over it and/or by navigating menus?
Here is my About Detail;
Oracle SQL Developer 3.2.20.09
Version 3.2.20.09
Build MAIN-09.87
Copyright © 2005, 2012 Oracle. All Rights Reserved.
IDE Version: 11.1.1.4.37.59.48
Product ID: oracle.sqldeveloper
Product Version: 11.2.0.09.87
Version
Component Version
========= =======
Java(TM) Platform 1.6.0_35
Oracle IDE 3.2.20.09.87
Properties
Name Value
==== =====
awt.toolkit sun.awt.windows.WToolkit
class.load.environment oracle.ide.boot.IdeClassLoadEnvironment
class.load.log.level CONFIG
class.transfer delegate
file.encoding Cp1252
file.encoding.pkg sun.io
file.separator \
ice.browser.forcegc false
ice.pilots.html4.ignoreNonGenericFonts true
ice.pilots.html4.tileOptThreshold 0
ide.AssertTracingDisabled true
ide.bootstrap.start 109707460930968
ide.build MAIN-09.87
ide.conf C:\app\twilliams\product\11.2.0\client_3\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf
ide.config_pathname C:\app\twilliams\product\11.2.0\client_3\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf
ide.debugbuild false
ide.devbuild false
ide.extension.search.path sqldeveloper/extensions:jdev/extensions:ide/extensions
ide.firstrun true
ide.java.minversion 1.6.0_04
ide.launcherProcessId 3276
ide.main.class oracle.ide.boot.IdeLauncher
ide.patches.dir ide/lib/patches
ide.pref.dir C:\Users\twilliams\AppData\Roaming\SQL Developer
ide.pref.dir.base C:\Users\twilliams\AppData\Roaming
ide.product oracle.sqldeveloper
ide.shell.enableFileTypeAssociation C:\app\twilliams\product\11.2.0\client_3\sqldeveloper\sqldeveloper\bin\sqldeveloperW.exe
ide.splash.screen splash.gif
ide.startingArg0 C:\app\twilliams\product\11.2.0\client_3\sqldeveloper\sqldeveloper\bin\sqldeveloperW.exe
ide.startingcwd C:\app\twilliams\product\11.2.0\client_3\SQLDEVELOPER\SQLDEVELOPER\BIN
ide.user.dir C:\Users\twilliams\AppData\Roaming\SQL Developer
ide.user.dir.var IDE_USER_DIR
ide.work.dir C:\Users\twilliams\Documents\SQL Developer
ide.work.dir.base C:\Users\twilliams\Documents
ilog.propagatesPropertyEditors false
java.awt.graphicsenv sun.awt.Win32GraphicsEnvironment
java.awt.printerjob sun.awt.windows.WPrinterJob
java.class.path ..\..\ide\lib\ide-boot.jar
java.class.version 50.0
java.endorsed.dirs C:\app\twilliams\product\11.2.0\client_3\sqldeveloper\jdk\jre\lib\endorsed
java.ext.dirs C:\app\twilliams\product\11.2.0\client_3\sqldeveloper\jdk\jre\lib\ext;C:\Windows\Sun\Java\lib\ext
java.home C:\app\twilliams\product\11.2.0\client_3\sqldeveloper\jdk\jre
java.io.tmpdir c:\Temp\
java.library.path C:\app\twilliams\product\11.2.0\client_3\sqldeveloper\sqldeveloper\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\app\twilliams\product\11.2.0\client_3\bin;C:\app\twilliams\product\11.2.0\client_3;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Lenovo\Access Connections\;C:\Program Files\WinMerge;C:\Program Files\ThinkPad\Bluetooth Software\;.
java.naming.factory.initial oracle.javatools.jndi.LocalInitialContextFactory
java.protocol.handler.pkgs oracle.jdevimpl.handler
java.runtime.name Java(TM) SE Runtime Environment
java.runtime.version 1.6.0_35-b10
java.specification.name Java Platform API Specification
java.specification.vendor Sun Microsystems Inc.
java.specification.version 1.6
java.util.logging.config.file logging.conf
java.vendor Sun Microsystems Inc.
java.vendor.url http://java.sun.com/
java.vendor.url.bug http://java.sun.com/cgi-bin/bugreport.cgi
java.version 1.6.0_35
java.vm.info mixed mode
java.vm.name Java HotSpot(TM) Client VM
java.vm.specification.name Java Virtual Machine Specification
java.vm.specification.vendor Sun Microsystems Inc.
java.vm.specification.version 1.0
java.vm.vendor Sun Microsystems Inc.
java.vm.version 20.10-b01
jdbc.driver.home /C:/app/twilliams/product/11.2.0/client_3/
jdbc.library /C:/app/twilliams/product/11.2.0/client_3/jdbc/lib/ojdbc6.jar
line.separator \r\n
oracle.home C:\app\twilliams\product\11.2.0\client_3\sqldeveloper
oracle.ide.util.AddinPolicyUtils.OVERRIDE_FLAG true
oracle.jdbc.mapDateToTimestamp false
oracle.translated.locales de,es,fr,it,ja,ko,pt_BR,zh_CN,zh_TW
oracle.xdkjava.compatibility.version 9.0.4
orai18n.library /C:/app/twilliams/product/11.2.0/client_3/jlib/orai18n.jar
os.arch x86
os.name Windows 7
os.version 6.1
path.separator ;
reserved_filenames con,aux,prn,lpt1,lpt2,lpt3,lpt4,lpt5,lpt6,lpt7,lpt8,lpt9,com1,com2,com3,com4,com5,com6,com7,com8,com9,conin$,conout,conout$
sqldev.debug false
sun.arch.data.model 32
sun.boot.class.path C:\app\twilliams\product\11.2.0\client_3\sqldeveloper\jdk\jre\lib\resources.jar;C:\app\twilliams\product\11.2.0\client_3\sqldeveloper\jdk\jre\lib\rt.jar;C:\app\twilliams\product\11.2.0\client_3\sqldeveloper\jdk\jre\lib\sunrsasign.jar;C:\app\twilliams\product\11.2.0\client_3\sqldeveloper\jdk\jre\lib\jsse.jar;C:\app\twilliams\product\11.2.0\client_3\sqldeveloper\jdk\jre\lib\jce.jar;C:\app\twilliams\product\11.2.0\client_3\sqldeveloper\jdk\jre\lib\charsets.jar;C:\app\twilliams\product\11.2.0\client_3\sqldeveloper\jdk\jre\lib\modules\jdk.boot.jar;C:\app\twilliams\product\11.2.0\client_3\sqldeveloper\jdk\jre\classes
sun.boot.library.path C:\app\twilliams\product\11.2.0\client_3\sqldeveloper\jdk\jre\bin
sun.cpu.endian little
sun.cpu.isalist pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86
sun.desktop windows
sun.io.unicode.encoding UnicodeLittle
sun.java2d.ddoffscreen false
sun.jnu.encoding Cp1252
sun.management.compiler HotSpot Client Compiler
sun.os.patch.level Service Pack 1
user.country US
user.dir C:\app\twilliams\product\11.2.0\client_3\SQLDEVELOPER\SQLDEVELOPER\BIN
user.home C:\Users\twilliams
user.language en
user.name twilliams
user.timezone America/Los_Angeles
user.variant
windows.shell.font.languages
Extensions
Name Identifier Version Status
==== ========== ======= ======
Check For Updates oracle.ide.webupdate 11.1.1.4.37.59.48 Loaded
Code Editor oracle.ide.ceditor 11.1.1.4.37.59.48 Loaded
Component Palette oracle.ide.palette1 11.1.1.4.37.59.48 Loaded
Data Miner oracle.dmt.dataminer 11.2.1.1.09.87 Disabled by user
Database Connection Support oracle.jdeveloper.db.connection 11.1.1.4.37.59.48 Loaded
Database Object Explorers oracle.ide.db.explorer 11.1.1.4.37.59.48 Loaded
Database UI oracle.ide.db 11.1.1.4.37.59.48 Loaded
Diagram Framework oracle.diagram 11.1.1.4.37.59.48 Loaded
Diagram Javadoc Extension oracle.diagram.javadoc 11.1.1.4.37.59.48 Loaded
Diagram Thumbnail oracle.diagram.thumbnail 11.1.1.4.37.59.48 Loaded
Diff/Merge oracle.ide.diffmerge 11.1.1.4.37.59.48 Loaded
Extended IDE Platform oracle.javacore 11.1.1.4.37.59.48 Loaded
External Tools oracle.ide.externaltools 11.1.1.4.37.59.48 Loaded
File Support oracle.ide.files 11.1.1.4.37.59.48 Loaded
Help System oracle.ide.help 11.1.1.4.37.59.48 Loaded
History Support oracle.jdeveloper.history 11.1.1.4.37.59.48 Loaded
Import/Export Support oracle.ide.importexport 11.1.1.4.37.59.48 Loaded
Index Migrator support oracle.ideimpl.indexing-migrator 11.1.1.4.37.59.48 Loaded
JDeveloper Runner oracle.jdeveloper.runner 11.1.1.4.37.59.48 Loaded
JViews Registration Addin oracle.diagram.registration 11.1.1.4.37.59.48 Loaded
Log Window oracle.ide.log 11.1.1.4.37.59.48 Loaded
Mac OS X Adapter oracle.ideimpl.apple 11.1.1.4.37.59.48 Loaded
Navigator oracle.ide.navigator 11.1.1.4.37.59.48 Loaded
Object Gallery oracle.ide.gallery 11.1.1.4.37.59.48 Loaded
Oracle IDE oracle.ide 11.1.1.4.37.59.48 Loaded
Oracle SQL Developer oracle.sqldeveloper 11.2.0.09.87 Loaded
Oracle SQL Developer - 3rd Party Database Browsers oracle.sqldeveloper.thirdparty.browsers 11.2.0.09.87 Loaded
Oracle SQL Developer - APEX Listener Administration oracle.sqldeveloper.listener 11.2.0.09.87 Loaded
Oracle SQL Developer - Change Mangement oracle.sqldeveloper.em_cm 11.2.0.09.87 Loaded
Oracle SQL Developer - DBA Navigator oracle.sqldeveloper.dbanavigator 11.2.0.09.87 Loaded
Oracle SQL Developer - Database Cart oracle.sqldeveloper.dbcart 11.2.0.09.87 Loaded
Oracle SQL Developer - Extras oracle.sqldeveloper.extras 11.2.0.09.87 Loaded
Oracle SQL Developer - File Navigator oracle.sqldeveloper.filenavigator 11.2.0.09.87 Loaded
Oracle SQL Developer - Migrations Antlr3 Translator oracle.sqldeveloper.migration.translation.core_antlr3 11.2.0.09.87 Missing dependencies: oracle.sqldeveloper.migration
Oracle SQL Developer - Migrations Application Migration oracle.sqldeveloper.migration.application 11.2.0.09.87 Disabled by user
Oracle SQL Developer - Migrations Core oracle.sqldeveloper.migration 11.2.0.09.87 Disabled by user
Oracle SQL Developer - Migrations DB2 oracle.sqldeveloper.migration.db2 11.2.0.09.87 Disabled by user
Oracle SQL Developer - Migrations DB2 Translator oracle.sqldeveloper.migration.translation.db2 11.2.0.09.87 Missing dependencies: oracle.sqldeveloper.migration, oracle.sqldeveloper.migration.translation.core_antlr3
Oracle SQL Developer - Migrations Microsoft Access oracle.sqldeveloper.migration.msaccess 11.2.0.09.87 Disabled by user
Oracle SQL Developer - Migrations Microsoft SQL Server oracle.sqldeveloper.migration.sqlserver 11.2.0.09.87 Disabled by user
Oracle SQL Developer - Migrations MySQL oracle.sqldeveloper.migration.mysql 11.2.0.09.87 Disabled by user
Oracle SQL Developer - Migrations Sybase Adaptive Server oracle.sqldeveloper.migration.sybase 11.2.0.09.87 Disabled by user
Oracle SQL Developer - Migrations T-SQL Translator oracle.sqldeveloper.migration.translation.core 11.2.0.09.87 Missing dependencies: oracle.sqldeveloper.migration
Oracle SQL Developer - Migrations Teradata oracle.sqldeveloper.migration.teradata 11.2.0.09.87 Disabled by user
Oracle SQL Developer - Migrations Teradata SQL Translator oracle.sqldeveloper.migration.translation.teradata_translator 11.2.0.09.87 Missing dependencies: oracle.sqldeveloper.migration, oracle.sqldeveloper.migration.translation.core
Oracle SQL Developer - Migrations Translation UI oracle.sqldeveloper.migration.translation.gui 11.2.0.09.87 Disabled by user
Oracle SQL Developer - Object Viewer oracle.sqldeveloper.oviewer 11.2.0.09.87 Loaded
Oracle SQL Developer - Real Time SQL Monitoring oracle.sqldeveloper.sqlmonitor 11.2.0.09.87 Loaded
Oracle SQL Developer - Reports oracle.sqldeveloper.report 11.2.0.09.87 Loaded
Oracle SQL Developer - Scheduler oracle.sqldeveloper.scheduler 11.2.0.09.87 Disabled by user
Oracle SQL Developer - Schema Browser oracle.sqldeveloper.schemabrowser 11.2.0.09.87 Loaded
Oracle SQL Developer - SearchBar oracle.sqldeveloper.searchbar 11.2.0.09.87 Loaded
Oracle SQL Developer - Security oracle.sqldeveloper.security 11.2.0.09.87 Disabled by user
Oracle SQL Developer - Snippet oracle.sqldeveloper.snippet 11.2.0.09.87 Loaded
Oracle SQL Developer - Spatial oracle.sqldeveloper.spatial 11.2.0.09.87 Disabled by user
Oracle SQL Developer - TimesTen oracle.sqldeveloper.timesten 11.2.0.09.87 Disabled by user
Oracle SQL Developer - Tuning oracle.sqldeveloper.tuning 11.2.0.09.87 Loaded
Oracle SQL Developer - Unit Test oracle.sqldeveloper.unit_test 11.2.0.09.87 Disabled by user
Oracle SQL Developer - User Extensions Support oracle.sqldeveloper.userextensions 11.2.0.09.87 Loaded
Oracle SQL Developer - Worksheet v2 oracle.sqldeveloper.worksheet 11.2.0.09.87 Loaded
Oracle SQL Developer - XML Schema oracle.sqldeveloper.xmlschema 11.2.0.09.87 Loaded
Oracle SQL Developer Data Modeler oracle.datamodeler 3.1.4.710 Disabled by user
Oracle SQL Developer Data Modeler - Reports oracle.sqldeveloper.datamodeler_reports 11.2.0.09.87 Disabled by user
PROBE Debugger oracle.jdeveloper.db.debug.probe 11.1.1.4.37.59.48 Loaded
Peek oracle.ide.peek 11.1.1.4.37.59.48 Loaded
Persistent Storage oracle.ide.persistence 11.1.1.4.37.59.48 Loaded
Property Inspector oracle.ide.inspector 11.1.1.4.37.59.48 Loaded
QuickDiff oracle.ide.quickdiff 11.1.1.4.37.59.48 Loaded
Replace With oracle.ide.replace 11.1.1.4.37.59.48 Loaded
Runner oracle.ide.runner 11.1.1.4.37.59.48 Loaded
VHV oracle.ide.vhv 11.1.1.4.37.59.48 Loaded
Versioning Support oracle.jdeveloper.vcs 11.1.1.4.37.59.48 Disabled by user
Versioning Support for Subversion oracle.jdeveloper.subversion 11.1.1.4.37.59.48 Missing dependencies: oracle.jdeveloper.vcs
Virtual File System oracle.ide.vfs 11.1.1.4.37.59.48 Loaded
Web Browser and Proxy oracle.ide.webbrowser 11.1.1.4.37.59.48 Loaded
XML Editing Framework IDE Extension oracle.ide.xmlef 11.1.1.4.37.59.48 Loaded
audit oracle.ide.audit 11.1.1.4.37.59.48 Loaded
classpath: protocol handler extension oracle.jdeveloper.classpath 11.1.1.0.0 Loaded
jdukshare oracle.bm.jdukshare 11.1.1.4.37.59.48 Loaded
mof-xmi oracle.mof.xmi 11.1.1.4.37.59.48 Loaded
oracle.ide.dependency oracle.ide.dependency 11.1.1.4.37.59.48 Loaded
oracle.ide.indexing oracle.ide.indexing 11.1.1.4.37.59.48 Loaded
palette2 oracle.ide.palette2 11.1.1.4.37.59.48 Loaded
status oracle.ide.status 11.1.1.4.37.59.48 Loaded
Thanks in advance...
Tom
Edited by: ERPDude on Feb 28, 2013 2:46 PMAces!!! You nailed it Gary...
Thank you.
I applied fixed noted in Re: Reduce SQLDeveloper memory footprint with JDK 1.7
For others, to summarize my changes.
product\11.2.0\client_3\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf
AddVMOption -XX:+UnlockExperimentalVMOptions
AddVMOption -XX:+UseG1GC
AddVMOption -XX:MaxGCPauseMillis=50
AddVMOption -XX:GCPauseIntervalMillis=200
AddVMOption -XX:MaxPermSize=128M
AddVMOption -Xms50M
AddVMOption -Xmx384M
AddVMOption -XX:MinHeapFreeRatio=10
AddVMOption -XX:MaxHeapFreeRatio=10
product\11.2.0\client_3\sqldeveloper\ide\bin\ide.conf
comment the following two lines as shown below
#AddVMOption -Xmx640M
#AddVMOption -Xms128M
Now SQL Developer runs at roughly 500 meg.
I guess the only thing I have left to ask others reviewing this would be if there is a way to get these memory values down without having much adverse impacts on SQL Developer based on newer JVM switches/functionalities.
The posts that drove these changes are old from a technologoical perspective :) 2010.
Tom -
Memory consumption of queries in workbooks
We have an issue with the exceution of a Workbook which contains several queries. The queries require very much memory which finally leads to a shortdump (TSV_TNEW_PAGE_ALLOC_FAILED). We found that during execution of the workbook the memory is not released after a query has been executed and therfore at some point of time the dump occurs. However, if the queries are refreshed manually one after the other in the workbook the memory is relaesed and finally the workbook can be executed by this workaround.
My question is, if anyone has an idea, if it is possible to apply a setting somewhere that the queries relaese the memory after execution when they are all refreshed together in the workbook?
Thanks a lot in advance for any hint & Kind regards,
Hans-JörgHi,
Try this,
You may be able to workaround the problem by increasing free memory avaiable, parameter em/initial_size_MB (contact your Basis team or refer note 835474).
Also concenrate on parameter ztta/roll_extension (Refer note 146289)
Try increasing the parameter, abap/heap_area_dia from tcode RZ11.
Also check the following notes in detail as well,
649327 Analysis of memory consumption
425207 SAP memory management, current parameter ranges
369726 TSV_TNEW_PAGE_ALLOC_FAILED
185185 Application: Analysis of memory bottlenecks
If the issue persist, please review SAP Note 779123 and query design.
check this,
http://scn.sap.com/thread/288222
http://www.sapfans.com/forums/viewtopic.php?f=3&t=109557
regards,
anand. -
Memory Consumption: Start A Petition!
I am using SQL Developer 4.0.0.13 Build MAIN 13.80. I was praying that SQL Developer 4.0 would no longer use so much memory and, when doing so, slow to a crawl. But that is not the case.
Is there a way to start a "petition" to have the SQL Development team focus on the products memory usage? This is problem has been there for years now with many posts and no real answer.
If there isn't a place to start a "petition" let's do something here that Oracle will respond to.
Thank youYes, at this point (after restarting) SQL Developer is functioning fine. Windows reports 1+ GB of free memory. I have 3 worksheets open all connected to two different DB connections. Each worksheet has 1 to 3 pinned query results. My problem is that after working in SQL Developer for a a day or so with perhaps 10 worksheets open across 3 database connections and having queried large data sets and performing large exports it becomes unresponsive even after closing worksheets. It appears like it does not clean up after itself to me.
I will use Java VisualVM to compare memory consumption and see if it reports that SQL Developer is releasing memory but in the end I don't care about that. I just need a responsive SQL Developer and if I need to close some worksheets at times I can understand doing so but at this time that does not help. -
Custom MediaStreamSource and Memory Leaks During SampleRequested
Greetings,
I have a nasty memory leak problem that is causing me to pull my hair out.
I'm implementing a custom MediaStreamSource along with MediaTranscoder to generate video to disk. The frame generation operation occurs in the SampleRequested handler (as in the MediaStreamSource example). No matter what I do - and I've tried a
ton of options - inevitably the app runs out of memory after a couple hundred frames of HD video. Investigating, I see that indeed GC.GetTotalMemory reports an increasing, and never decreasing, amount of allocated RAM.
The frame generator in my actual app is using RenderTargetBitmap to get screen captures, and is handing the buffer to MediaStreamSample.CreateFromBuffer(). However, as you can see in the example below, the issue occurs even with a dumb allocation
of RAM and no other actual logic. Here's the code:
void _mss_SampleRequested(Windows.Media.Core.MediaStreamSource sender, MediaStreamSourceSampleRequestedEventArgs args)
if ( args.Request.StreamDescriptor is VideoStreamDescriptor )
if (_FrameCount >= 3000) return;
var videoDeferral = args.Request.GetDeferral();
var descriptor = (VideoStreamDescriptor)args.Request.StreamDescriptor;
uint frameWidth = descriptor.EncodingProperties.Width;
uint frameHeight = descriptor.EncodingProperties.Height;
uint size = frameWidth * frameHeight * 4;
byte[] buffer = null;
try
buffer = new byte[size];
// do something to create the frame
catch
App.LogAction("Ran out of memory", this);
return;
args.Request.Sample = MediaStreamSample.CreateFromBuffer(buffer.AsBuffer(), TimeFromFrame(_FrameCount++, _frameSource.Framerate));
args.Request.Sample.Duration = TimeFromFrame(1, _frameSource.Framerate);
buffer = null; // attempt to release the memory
videoDeferral.Complete();
App.LogAction("Completed Video frame " + (_FrameCount-1).ToString() + "\n" +
"Allocated memory: " + GC.GetTotalMemory(true), this);
return;
It usually fails around frame 357, with GC.GetTotalMemory() reporting 750MB allocated.
I've tried tons of work-arounds, none of which made a difference. I tried putting the code that allocates the bytes in a separate thread - no dice. I tried Task.Delay to give the GC a chance to work, on the assumption that it just had no time
to do its job. No luck.
As another experiment, I wanted to see if the problem went away if I allocated memory each frame, but never assigned it to the MediaStreamSample, instead giving the sample (constant) dummy data. Indeed, in that scenario, memory consumption stayed
constant. However, while I never get an out-of-memory exception, RequestSample just stops getting called around frame 1600 and as a result the transcode operation never actually returns to completion.
I also tried taking a cue from the SDK sample which uses C++ entirely to generate the frame. So I passed the buffer as a Platform::Array<BYTE> to a static Runtime extension class function I wrote in C++.
I won't bore you with the C++ code, but even directly copying the bytes of the array to the media sample using memcpy still had the same result! It seems that there is no way to communicate the contents of the byte[] array to the media sample without
it never being released.
I know what some will say: the difference between my code and the SDK sample, of course, is that the SDK sample generates the frame _entirely_ in C++, thus taking care of its own memory allocation and deallocation. Because I want to get
the data from RenderTargetBitmap, this isn't an option for me. (As a side note, if anyone knows if there's a way to get the contents of an RT Window using DirectX, that might work too, but I know this is not a C++ forum, so...). But more importantly,
MediaStreamSource and MediaStreamSample are managed classes that appear to allow you to generate custom frames using C# or other managed code. The MediaStreamSample.CreateFromBuffer function appears to be tailored for exactly what I want. But there appears
to be no way to release the buffer when giving the bytes to the MediaStreamSample. At least none that I can find.
I know the RT version of these classes are new to Windows 8.1, but I did see other posts going back 3 years discussing a similar issue in Silverlight. That never appears to have been resolved.
I guess the question boils down to this: how do I safely get managed data, allocated during the SampleRequested handler, to the MediaStreamSample without causing a memory leak? Also, why would the SampleRequested handler just stop getting called
out of the blue, even when I artificially eliminate the memory leak problem?
Thanks so much for all input!Hi Rob -
Thanks for your quick reply and for clarifying the terminology.
In the Memory Usage test under Analyze/Performance and Diagnostics (is that what you mean?) it's clear that each frame of video being created is not released from memory except when memory consumption gets very high. GC will occasionally kick in, but eventually
it succumbs.
Interestingly, if I reduce the frame size substantially, say 320x240, it never runs out of RAM no matter how many frames I throw at it. The Memory Usage test, however, shows the same pattern. But this time the GC can keep up and release the RAM.
After playing with this ad nauseum, I am fairly convinced I know what the problem is, but the solution still escapes me. It appears that the Transcoder is requesting frames from the MediaStreamSource (and the MediaStreamSource is providing them via
my SampleRequested handler) faster than the Transcoder can write them to disk and release them. Why would this be happening? The MediaStreamSource.BufferTime property is - I thought - used to prevent this very problem. However, changing the BufferTime seems
to have no effect at all - even changing it to ZERO doesn't change anything. If I'm right, this would explain why the GC can't do its job - it can't release the buffers I'm giving to the Transcoder via SampleRequested because the Transcoder won't give them
up until it's finished transcoding and writing them to disk. And yet the transcoder keeps requesting samples until there's no more memory to create them with.
The following code, which I made from scratch to illustrate my scenario, should be air-tight according to everything I've read. And yet, it still runs out of memory when the frame size is too large.
If you or anyone else can spot the problem in this code, I'd be thrilled to hear it. Maybe I'm omitting a key step with regard to getting the deferral? Or maybe it's a bug in the back-end? Can I "slow down" the transcoder and force it to release samples
it's already used?
Anyway here's the new code, which other than App.cs is everything. So if I'm doing something wrong it will be in this module:
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Diagnostics;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Windows.UI.Popups;
using Windows.Storage;
using Windows.Storage.Pickers;
using Windows.Storage.Streams;
using Windows.Media.MediaProperties;
using Windows.Media.Core;
using Windows.Media.Transcoding;
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
namespace MyTranscodeTest
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class MainPage : Page
MediaTranscoder _transcoder;
MediaStreamSource _mss;
VideoStreamDescriptor _videoSourceDescriptor;
const int c_width = 1920;
const int c_height = 1080;
const int c_frames = 10000;
const int c_frNumerator = 30000;
const int c_frDenominator = 1001;
uint _frameSizeBytes;
uint _frameDurationTicks;
uint _transcodePositionTicks = 0;
uint _frameCurrent = 0;
Random _random = new Random();
public MainPage()
this.InitializeComponent();
private async void GoButtonClicked(object sender, RoutedEventArgs e)
Windows.Storage.Pickers.FileSavePicker picker = new Windows.Storage.Pickers.FileSavePicker();
picker.FileTypeChoices.Add("MP4 File", new List<string>() { ".MP4" });
Windows.Storage.StorageFile file = await picker.PickSaveFileAsync();
if (file == null) return;
Stream outputStream = await file.OpenStreamForWriteAsync();
var transcodeTask = (await this.InitializeTranscoderAsync(outputStream)).TranscodeAsync();
transcodeTask.Progress = (asyncInfo, progressInfo) =>
Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
_ProgressReport.Text = "Sourcing frame " + _frameCurrent.ToString() + " of " + c_frames.ToString() +
" with " + GC.GetTotalMemory(false).ToString() + " bytes allocated.";
await transcodeTask;
MessageDialog dialog = new MessageDialog("Transcode completed.");
await dialog.ShowAsync();
async Task<PrepareTranscodeResult> InitializeTranscoderAsync (Stream output)
_transcoder = new MediaTranscoder();
_transcoder.HardwareAccelerationEnabled = false;
_videoSourceDescriptor = new VideoStreamDescriptor(VideoEncodingProperties.CreateUncompressed( MediaEncodingSubtypes.Bgra8, c_width, c_height ));
_videoSourceDescriptor.EncodingProperties.PixelAspectRatio.Numerator = 1;
_videoSourceDescriptor.EncodingProperties.PixelAspectRatio.Denominator = 1;
_videoSourceDescriptor.EncodingProperties.FrameRate.Numerator = c_frNumerator;
_videoSourceDescriptor.EncodingProperties.FrameRate.Denominator = c_frDenominator;
_videoSourceDescriptor.EncodingProperties.Bitrate = (uint)((c_width * c_height * 4 * 8 * (ulong)c_frDenominator) / (ulong)c_frNumerator);
_frameDurationTicks = (uint)(10000000 * (ulong)c_frDenominator / (ulong)c_frNumerator);
_frameSizeBytes = c_width * c_height * 4;
_mss = new MediaStreamSource(_videoSourceDescriptor);
_mss.BufferTime = TimeSpan.FromTicks(_frameDurationTicks);
_mss.Duration = TimeSpan.FromTicks( _frameDurationTicks * c_frames );
_mss.Starting += _mss_Starting;
_mss.Paused += _mss_Paused;
_mss.SampleRequested += _mss_SampleRequested;
MediaEncodingProfile outputProfile = MediaEncodingProfile.CreateMp4(VideoEncodingQuality.Ntsc);
outputProfile.Audio = null;
return await _transcoder.PrepareMediaStreamSourceTranscodeAsync(_mss, output.AsRandomAccessStream(), outputProfile);
void _mss_Paused(MediaStreamSource sender, object args)
throw new NotImplementedException();
void _mss_Starting(MediaStreamSource sender, MediaStreamSourceStartingEventArgs args)
args.Request.SetActualStartPosition(new TimeSpan(0));
/// <summary>
/// This is derived from the sample in "Windows 8.1 Apps with Xaml and C# Unleashed"
/// </summary>
/// <param name="sender"></param>
/// <param name="args"></param>
void _mss_SampleRequested(MediaStreamSource sender, MediaStreamSourceSampleRequestedEventArgs args)
if (_frameCurrent == c_frames) return;
var deferral = args.Request.GetDeferral();
byte[] frameBuffer;
try
frameBuffer = new byte[_frameSizeBytes];
this._random.NextBytes(frameBuffer);
catch
throw new Exception("Sample source ran out of RAM");
args.Request.Sample = MediaStreamSample.CreateFromBuffer(frameBuffer.AsBuffer(), TimeSpan.FromTicks(_transcodePositionTicks));
args.Request.Sample.Duration = TimeSpan.FromTicks(_frameDurationTicks);
args.Request.Sample.KeyFrame = true;
_transcodePositionTicks += _frameDurationTicks;
_frameCurrent++;
deferral.Complete();
Again, I can't see any reason why this shouldn't work. You'll note it mirrors pretty closely the sample in the Windows 8.1 Apps With Xaml Unleashed book (Chapter 14). The difference is I'm feeding the samples to a transcoder rather than a MediaElement (which,
again should be no issue).
Thanks again for any suggestions!
Peter -
How to query in memory on a subset?
TopLink query in memory is quite an exclusive feature. However, it doesn't the obvious need for indexing. If anybody has exposure to .NET they will be aware of a paradimn shift of using SQL against structure in memory. I would like in my application to use TopLink query in memory to query against a specific list of persistent objects. I mean, I don't want TopLink iterate the 5000 instance of class X that is in the cache. I would like the following use cases be supported:
- query against UOW registered object, excluding session cache
- query against a specific list of registered objects
Please provide existing API in TopLink 10.x and if only exist in EclipseLink, let me know the API.
If API is missing, please create enhancement request and let me know the number.Below are the use cases so that you can easily derive API needed:
1- Load all instances of class X, the query for specific instances with where condition other than PK
- if loading is just one time, then query should check both uow/session, so already supported, but need index if lot of data.
- another way to see this, is that for each class that doesn't have too much instances, we want to load everything in memory, then redirect all query against the class to be in memory.
2- Batch method handling a range or subset. Like on a domain having many organizations. Start by getting all timesheets of organization X for last week from DB for optimization purpose. Then code start to classify/process the data, like query in memory for timesheets of this subset with state x, then y, z. This last query could just be against UOW, because just loaded the data. However, next query, which is againt only timesheet with state x, should ideally be against the list of timesheet with state x already populated in a collection. So having scope on UOW should be used only for performance, but having scope on a specific collection provide both specific result and performance. This use case may seems weird, but in complex/legacy application, it's often the case that we have existing not batch oriented code, which query for similar subset one after another which is not performant. Then faster refactoring to get performance, is to try to not modify existing not batch oriented query but redirect to memory when we are able to insure that memory is loaded with data needed before jumping on the not batch oriented legacy code.
3- Simplification of iteration by moving from verbose Java to SQL. We do have lot of code having a Collection of a Map having a Map. Then iterate when looking at some state of the leaf item we still filter out stuff. Be able to query in memory against collection/set, should simplify our code.
4- Remove duplicate SQLs. Complex application may end-up with different module calling same module to get a piece of information, so duplicate SQLs sent to DB if query is not against PK. Like select * from X where FK = y. If FK is unique, then I can avoid all duplicate SQLs to be sent to DB by looking first in UOW if any instances of object X exist with FK = y. In this case I want to look only in UOW for performance reason because index is not supported. -
Hello
I was running a query with output of around 9 lakh records. I did this with Toad earlier and now I tried with SQL Developer.
I found a difference like this.
When in toad the records were being fetched the memory used by Toad was not getting increased as shown in the Task manager processes. While the PF Usage was getting increased which I understand is SWAP file. When all the rows were received this increase was approximately same as the file I created after exporting that data.
In case of SQL Developer the memory used by SQL developer itself goes on increasing.
Will this have impact on machines actual RAM being used ?
or In other words is Toad using swap memory directly rather than consuming RAM for saving file output ?
Regards
SanjeevI believe the difference could be that toad fetches each record and automatically flushes it to the output file while SQL Developer might keep all the records in memory or use a different file handling method. Basically what you said sounds as a reasonable assumption.
Maybe you are looking for
-
How to connect an old HP LaserJet 5MP to a new iMac?
Having the worst trouble -- for starters, the printer isn't recognized in Printer Setup Utility, though HP's on-line notes tell me that 10.6.4 has everything it needs for this printer. If so, where on iMac should I see the driver file or whatever it'
-
Is there a way to create a group email list?
I am trying to set up a group email list so I don't need to restyle addresses every time. Easy to do in Outlook but how do I do it on my IPad?
-
Matchcode inside a table (selection problem)
Hi, I'm working on a table that allows the users to edit its values directly inside the table. Two of the four columns of the table should show, in "editing mode" (ie. when the row is selected/is the LeadSelection), an InputField with a matchcode. No
-
i cannot facetime due to a server error
-
Error while starting tnsnames listener
Hi, We installed oracle 8.0.6 on Windows 2000 machine, while starting the tnsnames listener we are getting the following error, " Could not start the OracleTNSListener80 service on local computer, The service did not report any error, this could be i