Bad performance when using complex database view with Toplink
Hi
Problem description
1. I have a complex query that collects the data from many DB tables. For this reason I create a database view based on this select. Using EJB 3.0 with Toplink I
mapped this view to a java object the same way I map database tables. The method I use to get the results is:
snippet code...
public List<VwKartela> VwKartela(Integer pperid) {
List<VwKartela> results = null;
Session session = getSessionFactory().acquireSession();
ExpressionBuilder bankfile = new ExpressionBuilder();
Expression exp1 = bankfile.get("perid").equal(pperid);
ReadAllQuery query = new ReadAllQuery();
query.setReferenceClass(VwKartela.class);
query.setSelectionCriteria(exp1);
results =(List<VwKartela>)session.executeQuery(query);
When running the select on the view prom SQL Plus I haven’t any performance problem.
2.Question: How can I improve the performance? I referenced to Toplink docs but I didn't improve the it.
Have anyone any experience is such cases?
Thank you
Thanos
Hi
After my last tests I conclude at the followings:
The query returns 1-30 records
Test 1: Using Form Builder
- Execution time 7-8 seconds
Test 2: Using Jdeveloper/Toplink/EJB 3.0/ADF and Oracle AS 10.1.3.0
- Execution time 25-27 seconds
Test 3: Using JDBC/ADF and Oracle AS 10.1.3.0
- Execution time 17-18 seconds
When I use:
session.setLogLevel(SessionLog.FINE) and
session.setProfiler(new PerformanceProfiler())
I don’t see any improvement in the execution time of the query.
Thank you
Thanos
Similar Messages
-
Poor performance when using kde desktop effect
Hey,
I'm having trouble when using kde effet (system settings -> desktop -> desktop effects).
I have a dual core E5200 3 ghz, 2 GB memory pc8500 and an HD4850 using fglrx driver, but I got incredible bad performance when using desktop effect and watching video, I can barely watch a 800x600 video in full screen mode without having bad performance, X getting up to 40% cpu usage.
Its really like my graphic card isnt handling the rendering stuff but 3D acceleration is working, I can play 3D game without problem so far (as long as the deskstop effect arent enabled cause the cpu have like a hard time handling both for recent game)
So I guess its some trouble with 2D acceleration or something like that, I read that some people had such issue, but I didnt figure a way to fix it.
Here is my xorg.conf, in case something is wrong with it :
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "aticonfig-Screen[0]-0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
ModulePath "/usr/lib/xorg/modules"
FontPath "/usr/share/fonts/misc"
FontPath "/usr/share/fonts/100dpi:unscaled"
FontPath "/usr/share/fonts/75dpi:unscaled"
FontPath "/usr/share/fonts/TTF"
FontPath "/usr/share/fonts/Type1"
EndSection
Section "Module"
Load "dri2"
Load "extmod"
Load "dbe"
Load "record"
Load "glx"
Load "dri"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5 6 7"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection
Section "Monitor"
Identifier "aticonfig-Monitor[0]-0"
Option "VendorName" "ATI Proprietary Driver"
Option "ModelName" "Generic Autodetecting Monitor"
Option "DPMS" "true"
EndSection
Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
### [arg]: arg optional
#Option "ShadowFB" # [<bool>]
#Option "DefaultRefresh" # [<bool>]
#Option "ModeSetClearScreen" # [<bool>]
Identifier "Card0"
Driver "vesa"
VendorName "ATI Technologies Inc"
BoardName "RV770 [Radeon HD 4850]"
BusID "PCI:8:0:0"
EndSection
Section "Device"
Identifier "aticonfig-Device[0]-0"
Driver "fglrx"
BusID "PCI:8:0:0"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "aticonfig-Screen[0]-0"
Device "aticonfig-Device[0]-0"
Monitor "aticonfig-Monitor[0]-0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
Thank you for any help.Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
### [arg]: arg optional
#Option "ShadowFB" # [<bool>]
#Option "DefaultRefresh" # [<bool>]
#Option "ModeSetClearScreen" # [<bool>]
Identifier "Card0"
Driver "vesa"
VendorName "ATI Technologies Inc"
BoardName "RV770 [Radeon HD 4850]"
BusID "PCI:8:0:0"
EndSection
and
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection
I see no reason for those to be there.
make a backup of your xorg.conf and remove / comment those lines. -
I have a tiny problem that is driving me mad. When I am playing an album in iTunes using cover flow view (with the playlist beneath the artwork picture) the picture is exactly above the album title. All is symmetrical. When I switch to full screen display, the artwork moves a couple of inches to the left and the display is therefore asymmetrical. Why and how do I correct it? It would drive you mad to.
Thanks for any help,
GrahamI was having the same problem, but tried the "Top Button + Home Button" reset and that did work for me. My unofficial guess is that perhaps RAM caches get filled through daily use of various apps leaving no memory for cover flow. Resetting the phone on the phone itself seems to reset that RAM. I can't say it's a cure-all, but it solved my issue. Hope this helps.
-
Since installing LTR 5.4, which I've now upgraded to 5.6, I've encountered repeated slowness and malfunctions in operations, especially when using the Compare View function and the Tab key to open and close the right and left side panels. Such problems never arose during two years of using LTR-4 and nothing else has changed on my computer. I have a pretty simple system with only a few plug-ins, which are usually not in operation. I have 12GB of RAM in my Windows 7 PC. I could illustrate these problems with screen shots if you would tell me how to submit screen shots. Otherwise I will try to describe the problems in words.
The problem is clearly cumulative, growing worse as usage time passes. Compare View feature gradually slows down and eventually seems to choke as my work session proceeds. If I Exit LTR and re-enter and start all over, things will work normally for maybe 30 minutes, but then the Compare View feature begins to become very slow to respond. In a recent example with my screen full of thumbnails in Library mode I highlighted two images to compare. LTR started to open the Compare View screen by first having the top row of thumbnails disappear to be replaced by the "SELECT" and "CANDIDATE" words in their spaces (but no images), but Compare View never succeeded in gaining control of the screen. After some seconds the top row of thumbnails reasserted its position and the Compare View windows disappeared. But LTR kept trying to bring them back. Again the top row of thumbnails would go away, Select and candidate would reappear, try again, and give up. This went on for at least 2-3 minutes before I tried to choose File and Exit, but even that did not initially want to respond. It doesn't like to accept other commands when it's trying to open Compare View. Finally it allowed me to exit.
To experiment I created a new catalog of 1100 images. After 30-40 minutes, the Compare View function began to operate very slowly. With left and right side panels visible and two thumbnails highlighted, hitting Compare View can take half a minute before the two mid-size images open in their respective SELECT and CANDIDATE windows. When the side panels are open and two images are in the Select/Candidate spaces, hitting the Tab button to close the side panels produces a very delayed response--25-30 seconds to close them, a few more seconds to enlarge the two images to full size. To reverse the process (i.e., to recall the two side panels), hitting Tab would make the two sides of the screen go black for up to a minute, with no words visible. Eventually the info fields in the panels would open up.
I also created a new user account and imported a folder of 160 images. After half an hour Compare View began mis-placing data. (I have a screen shot to show this.) CANDIDATE appears on the left side of SELECT, whereas it should be on the right. The accompanying camera exposure data appears almost entirely to the left of the mid-screen dividing line. Although the Candidate and Select headings were transposed, the image exposure data was not, but the data for the image on the right was almost entirely to the left of the line dividing the screen in two.
Gurus in The Lightroom Forum have examined Task Manager data showing Processes running and Performance indicators and they see nothing wrong. I could also send screen shots of this data.
At this point, the only way I can process my images is to work 30-40 minutes and then shut down everything, exit, and re-start LTR. This is not normal. I hope you can find the cause, and then the solution. If you would like to see my screen shots, tell me how to submit them.
Ollie
[email protected]Since installing LTR 5.4, which I've now upgraded to 5.6, I've encountered repeated slowness and malfunctions in operations, especially when using the Compare View function and the Tab key to open and close the right and left side panels. Such problems never arose during two years of using LTR-4 and nothing else has changed on my computer. I have a pretty simple system with only a few plug-ins, which are usually not in operation. I have 12GB of RAM in my Windows 7 PC. I could illustrate these problems with screen shots if you would tell me how to submit screen shots. Otherwise I will try to describe the problems in words.
The problem is clearly cumulative, growing worse as usage time passes. Compare View feature gradually slows down and eventually seems to choke as my work session proceeds. If I Exit LTR and re-enter and start all over, things will work normally for maybe 30 minutes, but then the Compare View feature begins to become very slow to respond. In a recent example with my screen full of thumbnails in Library mode I highlighted two images to compare. LTR started to open the Compare View screen by first having the top row of thumbnails disappear to be replaced by the "SELECT" and "CANDIDATE" words in their spaces (but no images), but Compare View never succeeded in gaining control of the screen. After some seconds the top row of thumbnails reasserted its position and the Compare View windows disappeared. But LTR kept trying to bring them back. Again the top row of thumbnails would go away, Select and candidate would reappear, try again, and give up. This went on for at least 2-3 minutes before I tried to choose File and Exit, but even that did not initially want to respond. It doesn't like to accept other commands when it's trying to open Compare View. Finally it allowed me to exit.
To experiment I created a new catalog of 1100 images. After 30-40 minutes, the Compare View function began to operate very slowly. With left and right side panels visible and two thumbnails highlighted, hitting Compare View can take half a minute before the two mid-size images open in their respective SELECT and CANDIDATE windows. When the side panels are open and two images are in the Select/Candidate spaces, hitting the Tab button to close the side panels produces a very delayed response--25-30 seconds to close them, a few more seconds to enlarge the two images to full size. To reverse the process (i.e., to recall the two side panels), hitting Tab would make the two sides of the screen go black for up to a minute, with no words visible. Eventually the info fields in the panels would open up.
I also created a new user account and imported a folder of 160 images. After half an hour Compare View began mis-placing data. (I have a screen shot to show this.) CANDIDATE appears on the left side of SELECT, whereas it should be on the right. The accompanying camera exposure data appears almost entirely to the left of the mid-screen dividing line. Although the Candidate and Select headings were transposed, the image exposure data was not, but the data for the image on the right was almost entirely to the left of the line dividing the screen in two.
Gurus in The Lightroom Forum have examined Task Manager data showing Processes running and Performance indicators and they see nothing wrong. I could also send screen shots of this data.
At this point, the only way I can process my images is to work 30-40 minutes and then shut down everything, exit, and re-start LTR. This is not normal. I hope you can find the cause, and then the solution. If you would like to see my screen shots, tell me how to submit them.
Ollie
[email protected] -
how do i access the data stored on my time capsule? for example, if i try to view a photo, i get the option to "view with iphoto" but when i click on "view with iphoto" nothing happens. i'm having similar trouble openning up movies, music, etc. it appears as though the files exist / saved on the time capsule (because i can see how much storage they consume), but i can't open them. thanks!
Unfortunately, Apple removed the feature to "browse backups" in Time Machine backups of iPhoto a few years ago.
You have to restore the entire iPhoto library to a separate location to be able to "see" it, and then choose the specific images that you want use.
For complete details, see #15 in Pondini's excellent support document Time Machine -- FAQ. Check the information in the pink box there.
Frequently Asked Questions -
How to select value from database view with * in wher clause
Hi ,
I ahve a database view with some fields.
Now my requirement is to serach a single row on the basis of process type.
Process type can have values like ZBA,ZBC,ZBD,ZBE or similarly anything starting with ZB.
Now i know that starting two letters will be ZB , but dont knwo the last letter.
So how should i use select query for the same?
Should i use like operator for the same?
regards
PGhi,
u can use character '%'.sample code like this
SELECT reltype
instid_a
catid_a
instid_b
FROM /dbm/ord_docflow
INTO TABLE it_link
FOR ALL ENTRIES IN it_pnwtyh
WHERE instid_a = it_pnwtyh-instid_a AND
instid_b LIKE 'QMSM%' AND
typeid_a = 'BUS2400' AND
typeid_b = 'BUS2400' AND
catid_a = 'BO' AND
catid_b = 'BO' AND
reltype = 'VONA'.
this is similar to using* while we fetch values from table.in the above code only i no QMSM rest values not sure,so used QMSM% -
When using Appleworks database for printing labels can I have columns of different widths?
When using Appleworks database for printing labels can I have a column of different width?
Case in point, the supplied avery labels in Appleworks does not have 8195. When I build one using custom design I need a small column between column 2 and 3 to line up the info in columns 3 and 4. All the labels are 1.3/4 inch wide but I need to insert a column 1/4 wide to match up with the avery page....
Any ideas???
Thanks......
---warrenWell, the issue is that when you creat a custom width of 1.3/4 from the edge of the first label to the edge of label 2 all is good. The right and left margins were also set correct in AW. The Avery page, for some reason, has a small 1/4 inch column between the columns of label 2 and 3 therefore making the distance between the left edge of the label in column 2 and the right edge of the label in column 3 - a width of 2 inches and not 1.3/4.
I guess Avery wanted the page to look even.
I did this work around.....
I created a custom lay out of 2 columns (not 4) with the correct width of 1.3/4 from label edge to label edge and the correct left side margin. After printing the first page I just turned the sheet 180 degress and printed the 2nd page to use all the labels on the Avery sheet. Since the upper and lower margin were the same it worked great....
"Great minds think alike"... thanks for your suggetion -
Create database view with Java Dictionary
Hi,
is there a possibility to create and deploy a database view with the
Java Dictionary (in SAP NetWeaver Development Studio)?
It seems as if you can only create and deploy database tables.or else, with prior versions, use somethinig like this...
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7094c365-e8c4-2910-62b6-93712dd555d4 -
How to numberformat when using sql:query alogn with c:forEach JSTL tags
Is there anyway to format the numeric values returned from the database when using <sql:query> alogn with <c:forEach> tags
Here is my jsp code
<sql:query..../>
<c:forEach var="row" items="${queryResults.rows}">
<tr>
<td><c:out value="${row.COL1}" /></td>
<td><c:out value="${row.COL2}" /></td>
</tr>
</c:forEach>
Col1 values are numeric without any formats Eg: 1000, 10000, 1000000 etc.
how can i format them to 1,000 , 10,1000 , 100,000 etcIt is polite to mention what your answer was. These posts are not just here for you to ask questions, but to be used as a resource for other people to find answers. Saying "I solved it" with no details helps noone.
I presume you discovered the JSTL <fmt:formatNumber> tag? -
Issue When Creating a Database View
Hi
I am trying two join two tables using a database view through SE11 and this tables are related to SAP HR.
As per the requirement we need to create a table join using SQVI in which we are facing a issue where the transaction is freezed as as we create a
Table join using SQVI.
So..
Is their any alternative method to join two tables in HR ABAP apart from SQVI.
When I try to create a DATBASE VIEW in SE11 it says no relation exists even there is one primary key in both the tables.
Can we do this using SE11 or is there any other way two join these tables or infotypes..for ex how we join p0008 and p0002
I am new to this pls help me.(Sry for posting ths in ABAP DEV)..Hi,
there is a difference between database tables and structures. Structures do no exist in the database, they are just a grouping of fields in ABAP dictionary. P0002 ans P0008 are structures that do not contain any data by definition.
You can create SQVI quick view or database view using database tables PA0002 and PA0008.
Check if all join conditions can be used in your case, you may change or delete join conditions using right-mouse-click.
Regards
Clemens -
Using a Database View and Untyped Dataset
Post Author: kramer9802
CA Forum: .NET
Product:Crystal Reports XI Release 2
Version:
Patches Applied:
Operating System(s):XP
Database(s):Oracle
Error Messages: Steps to Reproduce: Normally, the reports we create are designed based on Oracle tables. Then the data source is set to a dataset I populate in code from a SQL statement. I know this isn't necessarily how it is done in the documentation, but it has been working. What I am trying to do now is use a database view to design the report and then populate the my dataset based on a query on the view for VB code. When I do that my dataset only has one row, but my report is building based on all the rows returned by the view (Thousands). The sql is something like this Select * From xyz_view where record_id= ('The record the user wants to see') The view basically pulls back the data from several tables and also pulls back a few lookup tables that have description of value fields. I would use formula fields for the description but there is a lot records. I know that you can't pass a parameter into a view, so that is why I use select statement against the view to filter it down to the specific record I want. So I guess my question is why does build the report based on all the records from the view rather than all the one record in the Dataset? If I do the same thing but design the report based on a table or serveral tables, then the report only contains records from the dataset. I think I kind of know that the report is ignoring the dataset, but I guess I just need to know if there is an easy way to make this work or do I need to reconsider how I design and populate the reports. The reports are non-embedded based on a business requirement. let me know if this doesn't make sense or you need more details. Thanks KramerPost Author: Argan
CA Forum: .NET
Honestly I do not know.
This question is more of a design issue and would be better suited to Crystal Reports forum
http://technicalsupport.businessobjects.com/cs/forums/13/ShowForum.aspx
As an aside, technically speaking if you are using datasets then you should be designing the report against the schema of the dataset you are going to be passing, not the tables or storeprocs or views themselves. -
Intermittent error when using the Disco Viewer client
Hi, I have a user receiving the following intermittent error when using the Discoverer Viewer client:
“The application encountered an invalid state.
- Discoverer Beans XML Exception. Method: findNode Class: XMLUtils Error: Cannot find parent node. Parent element does not exist in XML document, looking for database_account/eul
OracleBI Discoverer Viewer was unable to find the necessary data for displaying the results of this event. Please correct any errors and try again.”
Any idea what this might be? Any help or direction would be very much appreciated! Thank you!Hello
Is this related to a single machine or common to a single report or is it purely random?
I did a search on your behalf and came up with nothing related to this error. You may therefore need to raise the problem with Oracle Support.
Just out of curiosity which version of Discoverer are you using?
Michael -
When using facetime having difficulty with video.msound is ok. Screen says reconnecting
There have been numerous reports of FaceTime problems for the last several days and it is unclear what the cause if. Following is one of many discussions of the issue: https://discussions.apple.com/thread/6096640?tstart=120
-
Hello!
We have the following problem:
LabView (8.2) hangs when using I/O operations with traditional NI-DAQ 7.4.4 after aborting LabView program
We freshly installed LabView 8.2 (2006) and NI-DAQ 7.4.4 on a PC running Windows XP (Service Pack 3). We built a larger vi that remotely controls a traditional NI-DAQ card (AT-AO-10) on a second PC via NI-VISA 5.0.3. We were successfully running this program until a power failure caused the first computer to crash. After this crash we were unable to start the program again: LabView freezes while loading the vi. LabView itself can be started but freezes when adding I/O operations from the NI-DAQ palette to a block diagram.
We have tried to re-install NI-DAQ 7.4.4, but it did not help. We then re-installed all NI software, but still no improvement. In the end we decided to reinstall ALL software, first Windows XP, then LabView and finally NI-DAQ 7.4.4. This worked. However, after a few days of running the program we had to abort LabView via Windows Task manager and afterward we again experienced the same problem as before: LabView freezes when loading the program.
Obviously, we cannot afford to reinstall Windows every time. Are there any known Windows XP / NI-DAQ issues that might cause the freezing of LabView? We would be very grateful for any idea.
Best regards,
MatthiasHello Sprice,
Browse the shipping examples according to “Directory Structure” and then select
DAQ to find the Traditional DAQ examples.
There a lot of examples that are written for counters (Counter >>
daq-stc.llb >> Count Edges (DAQ-STC).vi).
What kind of signals are your photons creating? Are they TTL compatible at a certain
frequency? You don’t care about overwriting
your buffer?
Respectfully,
Rob F
Test Engineer
Condition Measurements
National Instruments -
When using printer Epson R1900 with Aperture 3 and if I mistakenly choose the wrong paper such as, epson's luster instead of glossy, does that change the exposure? Like make it too dark one or two stops!
Hi,
If you choose the incorrect settings for printing, yes - the print quality will be affected.
Different papers absorb the ink differently, so you can end up with prints that are too light, too dark, or have a colour cast if you make incorrect choices in your Aperture or printer settings.
Maybe you are looking for
-
Internet not connecting after ios 7.0.2 update on iphone 5
Internet not connecting after ios 7.0.2 update on iphone 5
-
i just unboxed my new ipod touch 4th gen and it tells me that it can not sync because of an internal error should i return it or is there a way to fix the issue?
-
Upgrade 10.1.2 to 10.2
The installer says I can't do this from the media and I should reference the docs on how to update. The docs don't make any mention of upgrading from 10.1.2a. Is this possible with the .iso? If so, how? Server is OES2 Linux, if it matters. Using ZCM
-
In-place rendering of file item
Hi, I'm currently using the Early Adopter version of Portal. Is there simple way of displaying a file item type in-place, i.e. rendered in the folder content area? I know this does not apply to binary file types but for html files it would be OK. I h
-
Revision: 15438 Revision: 15438 Author: [email protected] Date: 2010-04-15 03:39:34 -0700 (Thu, 15 Apr 2010) Log Message: -Change initialization objects of Cairngorm Parsley extensions to Parsley convention (i.e. CairngormModuleLib>CairngormMo