Very slow deployment with in-process=true
Hi,
I'm in the process of porting an enterprise application (packaged into a single EAR file) from JBoss to OC4J.
For now, the biggest part of the application (which is still under development) is an ejb-module with about 66 entity beans with a total of 243 CMR- and 536 CMP-fields. The remaining parts are a few session beans and a few simple web-applications.
One of the problems I'm experiencing during porting the application is the very slow deployment of enterprise beans on oc4j, especially when having set in-process=true.
Deployment on JBoss 3.2.4RC1 takes 28 seconds.
Deployment on OC4J 9.0.4.0.0 takes 20 minutes (cpu-time!).
My deployment platform is an Intel P4, 1.4 GHz, 1024 MB RAM, MS Windows NT 4.0, Sun J2SDK 1.4.2_04.
OC4J is started with "%JAVA_HOME%\bin\java.exe -verbose:gc -Xms192m -Xmx256m -DassociateUsingThirdTable=true -jar oc4j.jar -userThreads -verbosity 10". OC4J is configured to perform in-process compilation.
So far my investigation shows that OC4J is spending a few minutes probably for analyzing and generating wrapper/proxy classes. Then it starts the in-process compilation which accounts for the bigger part of the 20 minutes.
During that time, "-verbose:gc" shows that it's spending only the usual amount of a few milliseconds per second for GC.
I also had a look at the generated wrapper/proxy classes. The size of some files is intimidating. The biggest one has a size of 1,566,791 bytes (31,930 lines) (- seems that it consists of 95% duplicated code ;-)). This generated source file belongs to a entity beans that I wouldn't describe as being really huge: it has 25 CMP- and 18 CMR fields.
But this is probably not the cause for the extreme slow-down:
Another test with in-process=false was much faster (when compared to the former test): about 2 minutes 30 seconds.
But actually this is still very slow.
Is this a known problem or am I the only one experiencing slow deployments?
How can I speed up deployment times?
Suggestions greatly appreciated.
Stefan Schmidt
No TAR yet as this is currently one of the minor problems with OC4J. :-( I'll file a TAR after we've solved some more pressuring problems here.
For now I use in-process=false. Which is still slow, but at least I see can see the reason for this: it simply takes javac some time to compile the generated junk of java sources.
Similar Messages
-
Very slow connection with Mifi 4510L??
I'm hoping someone here can give some guidance. I am having very slow connection with the 4510L we just got. Via test on speedtest.net I'm seeing download speed of .17 MBPS at times it was so slow the test was not completing. I normally have 1 or 2 bars on the mifi unit and have seen up to 3 at times. I drove into town and see the same range (1 to 3 bars). I have yet to see the 4G light come on except for prior to activation (would light solid green at times) since activating I have only seen the violet light for 3G.
Verizon advertises full service both around our city (Richmond, VA) and at my more remote location in Hanover. I have been through the recommended resets and nothing seems to improve the connection speed. Could the unit itself be defective? Also, I've noticed when I go to a location website it thinks I am in Pennsylvania when I am in Virginia. Could the Mifi be trying to connect to a signal in that location for some reason (was refurbished device)
Thanks for any help you can offer,
BrianI was having problems but upgrading to 2.28 seems to have helped me in addition to a few other changes I made based on this review of the 4510L
http://www.anandtech.com/show/4500/novatel-wireless-mifi-4510l-review-the-best-4g-lte-wifi-hotspot/4
1) "selecting WPA2 Personal/PSK (AES)"
2) "manually selecting a channel (instead of Auto) fixes almost all the instability problems"
(I'm not sure if it actually worked as the diagnostics always shows channel 0 no matter what I picked. I did try a couple before one - or the myriad of other things I tried - seemed to make a difference - at least for now - fingers crossed)
3) "allowing for one to select between each network mode manually, so you can force 4G LTE, EVDO, 1xRTT, or all of the above. This is incredibly useful if you’re right at the cutoff for 4G LTE SINR" (that's WWAN Preferred Mode LTE only for me)
4) I also changed my 802.11 Mode to just one mode that works on both computers at my house
5) I am also careful to turn it off when I am done with it and take it off the charger for the night as well.
It is my only internet service due to my semiremote location (no cable etc) and when I first got it as a replacement for my dependable 2200 I was about to pull all my hair out. I was "forced" into it because due to antenna issues on a local tower that supplies my 3G signal my 2200 wasn't even able to load my gmail account. Verizon very helpful on that - call us if its still an issue in a "few weeks"! However, when I inquired about the antenna's effect on a 4G signal, an intelligent tech was able to tell me that it was not the tower I would be getting a 4G signal off of - odd but I didn't question that possibility.
It runs very very warm but I suspect having it on the charger and using it almost all day is part of that. At first I was wondering if heat was part of the problem - going so far as to have it sitting on an ice pack to test that theory. Of course then I had to wonder if maybe I was freezing it -lol. I am careful to turn it off when I am done with it and take it off the charger for the night as well.
I've been on it most of the day and it seems to be behaving well - so fingers crossed -
Very slow computer with all apps after Yosemite install
I'm attaching the EtreCheck in order to get some help. Thanks.
Problem description:
Very slow launch of applications with Yosemite
EtreCheck version: 2.1.2 (105)
Report generated 15 de diciembre de 2014, 19:28:26 GMT+1
Hardware Information: ℹ️
MacBook Pro (15-inch, Late 2011) (Verified)
MacBook Pro - model: MacBookPro8,2
1 2.2 GHz Intel Core i7 CPU: 4-core
8 GB RAM Upgradeable
BANK 0/DIMM0
4 GB DDR3 1333 MHz ok
BANK 1/DIMM0
4 GB DDR3 1333 MHz ok
Bluetooth: Old - Handoff/Airdrop2 not supported
Wireless: en1: 802.11 a/b/g/n
Video Information: ℹ️
Intel HD Graphics 3000 - VRAM: 512 MB
AMD Radeon HD 6750M - VRAM: 512 MB
Color LCD 1920 x 1080
HP 2311x 1920 x 1080 @ 60 Hz
System Software: ℹ️
OS X 10.10.1 (14B25) - Uptime: 0:22:35
Disk Information: ℹ️
APPLE HDD HTS727575A9E362 disk0 : (750,16 GB)
S.M.A.R.T. Status: Verified
EFI (disk0s1) <not mounted> : 210 MB
Recovery HD (disk0s3) <not mounted> [Recovery]: 650 MB
Macintosh HD (disk1) / : 748.93 GB (83.02 GB free)
Core Storage: disk0s2 749.30 GB Online
MATSHITADVD-R UJ-8A8
USB Information: ℹ️
Apple Inc. FaceTime HD Camera (Built-in)
Western Digital My Passport 0748 2 TB
S.M.A.R.T. Status: Verified
disk2s1 (disk2s1) <not mounted> : 210 MB
Mi Passport (disk2s2) /Volumes/Mi Passport : 2.00 TB (121.89 GB free)
Apple Inc. BRCM2070 Hub
Apple Inc. Bluetooth USB Host Controller
Apple Inc. Apple Internal Keyboard / Trackpad
Apple Computer, Inc. IR Receiver
Thunderbolt Information: ℹ️
Apple Inc. thunderbolt_bus
Gatekeeper: ℹ️
Anywhere
Adware: ℹ️
Geneio [Remove]
Kernel Extensions: ℹ️
/Library/Application Support/Roxio
[not loaded] com.roxio.TDIXController (2.0) [Support]
/Library/Extensions
[loaded] at.obdev.nke.LittleSnitch (4228 - SDK 10.8) [Support]
[not loaded] com.microsoft.VirtualPC.Networking.1040 (7.0.2) [Support]
[not loaded] com.pgp.iokit.PGPdiskDriver (9) [Support]
[not loaded] com.pgp.kext.PGPnke (1.0.0) [Support]
/System/Library/Extensions
[not loaded] com.elgato.driver.DontMatchAfaTech (1.1) [Support]
[not loaded] com.elgato.driver.DontMatchCinergy450 (1.1) [Support]
[not loaded] com.elgato.driver.DontMatchCinergyXS (1.1) [Support]
[not loaded] com.elgato.driver.DontMatchEmpia (1.1) [Support]
[not loaded] com.elgato.driver.DontMatchVoyager (1.1) [Support]
[not loaded] com.hzsystems.driver.CDSDAudioCaptureSupport (1.5) [Support]
[not loaded] com.paceap.kext.pacesupport.master (5.6.1) [Support]
[not loaded] com.pgp.iokit.PGPwdeFilter (1.0.1) [Support]
[not loaded] com.roxio.BluRaySupport (1.1.6) [Support]
[loaded] com.squirrels.airparrot.framebuffer (2 - SDK 10.7) [Support]
[loaded] com.squirrels.driver.AirParrotSpeakers (1.7 - SDK 10.7) [Support]
[not loaded] com.wdc.driver.1394HP (1.0.9) [Support]
[not loaded] com.wdc.driver.USBHP (1.0.11) [Support]
/System/Library/Extensions/PACESupportFamily.kext/Contents/PlugIns
[not loaded] com.paceap.kext.pacesupport.leopard (5.6.1) [Support]
[not loaded] com.paceap.kext.pacesupport.panther (5.6.1) [Support]
[not loaded] com.paceap.kext.pacesupport.tiger (5.6.1) [Support]
Startup Items: ℹ️
PACESupport: Path: /Library/StartupItems/PACESupport
Startup items are obsolete in OS X Yosemite
Launch Agents: ℹ️
[running] at.obdev.LittleSnitchUIAgent.plist [Support]
[running] com.amazon.sendtokindle.launcher.plist [Support]
Launch Daemons: ℹ️
[running] at.obdev.littlesnitchd.plist [Support]
[loaded] com.barebones.authd.plist [Support]
[running] com.filemaker.fms.plist [Support]
[loaded] com.microsoft.office.licensing.helper.plist [Support]
[not loaded] com.squirrels.kextinstaller.plist [Support]
[failed] PACESupport.plist [Support]
User Launch Agents: ℹ️
[loaded] com.adobe.ARM.[...].plist [Support]
[loaded] com.adobe.ARM.[...].plist [Support]
[loaded] com.adobe.ARM.[...].plist [Support]
[running] com.genieo.completer.download.plist Adware! [Remove]
[loaded] com.genieo.completer.ltvbit.plist [Support]
[loaded] com.genieo.completer.update.plist Adware! [Remove]
[loaded] com.google.keystone.agent.plist [Support]
[failed] com.Wondershare.TunesGoWatchDemo.plist [Support]
User Login Items: ℹ️
Dropbox Aplicación (/Applications/Dropbox.app)
Genieo Aplicación (/Applications/Genieo.app)
Genieo Aplicación (/Applications/Genieo.app)
Internet Plug-ins: ℹ️
Flip4Mac WMV Plugin: Version: 2.4.2.4 [Support]
QuickTime Plugin: Version: 7.7.3
Default Browser: Version: 600 - SDK 10.10
AmazonMP3DownloaderPlugin: Version: AmazonMP3DownloaderPlugin 1.0.15 [Support]
OfficeLiveBrowserPlugin: Version: 12.2.3 [Support]
Mathematica: Version: 8.0.1.2063850 [Support]
iPhotoPhotocast: Version: 7.0 - SDK 10.7
User internet Plug-ins: ℹ️
WebEx64: Version: 1.0 - SDK 10.6 [Support]
Safari Extensions: ℹ️
Evernote Web Clipper
Slick Savings Adware! [Remove]
Omnibar Adware! [Remove]
MacVeXe
Amazon Shopping Assistant Adware! [Remove]
Ebay Shopping Assistant Adware! [Remove]
Searchme Adware! [Remove]
3rd Party Preference Panes: ℹ️
Flip4Mac WMV [Support]
Perian [Support]
Time Machine: ℹ️
Skip System Files: NO
Mobile backups: OFF
Auto backup: YES
Volumes being backed up:
Macintosh HD: Disk size: 748.93 GB Disk used: 665.91 GB
Destinations:
Mi Passport [Local]
Total size: 2.00 TB
Total number of backups: 99
Oldest backup: 2013-01-04 00:59:11 +0000
Last backup: 2014-11-24 02:17:18 +0000
Size of backup disk: Adequate
Backup size 2.00 TB > (Disk used 665.91 GB X 3)
Top Processes by CPU: ℹ️
38% WindowServer
33% Finder
24% calibre
2% launchd
2% com.apple.WebKit.Networking
Top Processes by Memory: ℹ️
507 MB calibre
301 MB java
258 MB Finder
232 MB WindowServer
223 MB Safari
Virtual Memory Information: ℹ️
126 MB Free RAM
3.41 GB Active RAM
3.29 GB Inactive RAM
1.44 GB Wired RAM
2.89 GB Page-ins
15 MB Page-outs
Diagnostics Information: ℹ️
Dec 15, 2014, 07:06:53 PM Self test - passed
Dec 15, 2014, 07:02:31 PM CVMCompiler_2014-12-15-190231_MacBook-Pro-de-Manuel-3.crash
Dec 15, 2014, 07:02:11 PM iBooks_2014-12-15-190211_MacBook-Pro-de-Manuel-3.crash
Dec 15, 2014, 07:01:51 PM aslmanager_2014-12-15-190151_MacBook-Pro-de-Manuel-3.crash
Dec 15, 2014, 06:57:58 PM QuickLookSatellite_2014-12-15-185758_MacBook-Pro-de-Manuel-3.crash
Dec 15, 2014, 06:57:46 PM QuickLookSatellite_2014-12-15-185746_MacBook-Pro-de-Manuel-3.crash
Dec 15, 2014, 06:57:23 PM QuickLookSatellite_2014-12-15-185723_MacBook-Pro-de-Manuel-3.crash
Dec 15, 2014, 06:56:06 PM calibre_2014-12-15-185606_MacBook-Pro-de-Manuel-3.crash
Dec 15, 2014, 06:55:55 PM mdworker32_2014-12-15-185555_MacBook-Pro-de-Manuel-3.crash
Dec 15, 2014, 06:55:49 PM garcon_2014-12-15-185549_MacBook-Pro-de-Manuel-3.crash
Dec 15, 2014, 06:55:35 PM garcon_2014-12-15-185535_MacBook-Pro-de-Manuel-3.crash
Dec 15, 2014, 06:55:20 PM xpcproxy_2014-12-15-185520_MacBook-Pro-de-Manuel-3.crash
Dec 15, 2014, 06:53:55 PM mdworker_2014-12-15-185355_MacBook-Pro-de-Manuel-3.crash
Dec 15, 2014, 06:51:46 PM mdworker_2014-12-15-185146_MacBook-Pro-de-Manuel-3.crash
Dec 15, 2014, 06:51:30 PM lssave_2014-12-15-185130_MacBook-Pro-de-Manuel-3.crash
Dec 15, 2014, 06:51:30 PM xpcproxy_2014-12-15-185130_MacBook-Pro-de-Manuel-3.crash
Dec 15, 2014, 04:44:18 AM mdworker_2014-12-15-044418_MacBook-Pro-de-Manuel-3.crash
Dec 15, 2014, 01:13:43 AM mdworker_2014-12-15-011343_MacBook-Pro-de-Manuel-3.crash
Dec 15, 2014, 12:07:47 AM mdworker_2014-12-15-000747_MacBook-Pro-de-Manuel-3.crash
Dec 14, 2014, 09:25:36 PM AdobeReader_2014-12-14-212536_MacBook-Pro-de-Manuel-3.hang
Dec 14, 2014, 09:25:34 PM Mail_2014-12-14-212534_MacBook-Pro-de-Manuel-3.hang
Dec 14, 2014, 09:22:33 PM mdworker_2014-12-14-212233_MacBook-Pro-de-Manuel-3.crash
Dec 14, 2014, 09:18:19 PM mdworker_2014-12-14-211819_MacBook-Pro-de-Manuel-3.crash
Dec 14, 2014, 04:52:14 PM mdworker_2014-12-14-165214_MacBook-Pro-de-Manuel-3.crash
Dec 14, 2014, 03:03:01 PM mdworker_2014-12-14-150301_MacBook-Pro-de-Manuel-3.crash
Dec 14, 2014, 03:02:51 PM mdworker_2014-12-14-150251_MacBook-Pro-de-Manuel-3.crash
Dec 14, 2014, 01:14:28 PM mdworker_2014-12-14-131428_MacBook-Pro-de-Manuel-3.crash
Dec 14, 2014, 01:13:34 PM genatsdb_2014-12-14-131334_MacBook-Pro-de-Manuel-3.crash
Dec 14, 2014, 01:12:48 PM lssave_2014-12-14-131248_MacBook-Pro-de-Manuel-3.crash
Dec 14, 2014, 01:12:48 PM mdworker_2014-12-14-131248_MacBook-Pro-de-Manuel-3.crash
Dec 14, 2014, 01:09:13 PM mdworker_2014-12-14-130913_MacBook-Pro-de-Manuel-3.crash
Dec 14, 2014, 10:42:20 AM mdworker_2014-12-14-104220_MacBook-Pro-de-Manuel-3.crash
Dec 14, 2014, 04:04:06 AM mdworker_2014-12-14-040406_MacBook-Pro-de-Manuel-3.crash
Dec 14, 2014, 04:04:06 AM lssave_2014-12-14-040406_MacBook-Pro-de-Manuel-3.crash
Dec 14, 2014, 04:04:06 AM aslmanager_2014-12-14-040406_MacBook-Pro-de-Manuel-3.crash
Dec 14, 2014, 12:44:32 AM maspushagent_2014-12-14-004432_MacBook-Pro-de-Manuel-3.crash
Dec 14, 2014, 12:44:26 AM mdworker_2014-12-14-004426_MacBook-Pro-de-Manuel-3.crash
Dec 14, 2014, 12:44:23 AM lssave_2014-12-14-004423_MacBook-Pro-de-Manuel-3.crash
Dec 14, 2014, 12:44:19 AM aslmanager_2014-12-14-004419_MacBook-Pro-de-Manuel-3.crash
Dec 14, 2014, 12:44:18 AM nehelper_2014-12-14-004418_MacBook-Pro-de-Manuel-3.crash
Dec 13, 2014, 10:55:16 PM mdworker_2014-12-13-225516_MacBook-Pro-de-Manuel-2.crash
Dec 13, 2014, 10:55:15 PM mdworker_2014-12-13-225515_MacBook-Pro-de-Manuel-2.crash
Dec 13, 2014, 06:26:48 PM mdworker_2014-12-13-182648_MacBook-Pro-de-Manuel-2.crash
Dec 13, 2014, 05:13:08 AM AddressBookSourceSync_2014-12-13-051308_MacBook-Pro-de-Manuel-2.crash
Dec 13, 2014, 04:39:35 AM mdworker_2014-12-13-043935_MacBook-Pro-de-Manuel-2.crash
Dec 13, 2014, 04:09:31 AM mdworker_2014-12-13-040931_MacBook-Pro-de-Manuel-2.crash
Dec 13, 2014, 04:08:51 AM mdworker_2014-12-13-040851_MacBook-Pro-de-Manuel-2.crash
Dec 13, 2014, 04:06:42 AM lssave_2014-12-13-040642_MacBook-Pro-de-Manuel-2.crash
Dec 13, 2014, 04:06:39 AM lssave_2014-12-13-040639_MacBook-Pro-de-Manuel-2.crash
Dec 13, 2014, 04:06:30 AM mdworker_2014-12-13-040630_MacBook-Pro-de-Manuel-2.crash
Dec 13, 2014, 04:06:30 AM lssave_2014-12-13-040630_MacBook-Pro-de-Manuel-2.crash
Dec 13, 2014, 04:05:33 AM mdworker_2014-12-13-040533_MacBook-Pro-de-Manuel-2.crash
Dec 13, 2014, 04:03:31 AM iTunes_2014-12-13-040331_MacBook-Pro-de-Manuel-2.crash
Dec 13, 2014, 04:03:23 AM AddressBookSourceSync_2014-12-13-040323_MacBook-Pro-de-Manuel-2.crash
Dec 13, 2014, 04:03:12 AM findNames_2014-12-13-040312_MacBook-Pro-de-Manuel-2.crash
Dec 13, 2014, 04:03:02 AM systemstatsd_2014-12-13-040302_MacBook-Pro-de-Manuel-2.crashFirst you need to get rid of all the malware on your computer starting with Genieo. Also, get rid of:
[failed] com.Wondershare.TunesGoWatchDemo.plist [Support]
[failed] PACESupport.plist [Support]
Startup Items: ℹ️
PACESupport: Path: /Library/StartupItems/PACESupport
Startup items are obsolete in OS X Yosemite
Helpful Links Regarding Malware Problems
If you are having an immediate problem with ads popping up see The Safe Mac » Adware Removal Guide, AdwareMedic, or Remove unwanted adware that displays pop-up ads and graphics on your Mac - Apple Support.
Open Safari, select Preferences from the Safari menu. Click on Extensions icon in the toolbar. Disable all Extensions. If this stops your problem, then re-enable them one by one until the problem returns. Now remove that extension as it is causing the problem.
The following comes from user stevejobsfan0123. I have made minor changes to adapt to this presentation.
Fix Some Browser Pop-ups That Take Over Safari.
Common pop-ups include a message saying the government has seized your computer and you must pay to have it released (often called "Moneypak"), or a phony message saying that your computer has been infected, and you need to call a tech support number (sometimes claiming to be Apple) to get it resolved. First, understand that these pop-ups are not caused by a virus and your computer has not been affected. This "hijack" is limited to your web browser. Also understand that these messages are scams, so do not pay any money, call the listed number, or provide any personal information. This article will outline the solution to dismiss the pop-up.
Quit Safari
Usually, these pop-ups will not go away by either clicking "OK" or "Cancel." Furthermore, several menus in the menu bar may become disabled and show in gray, including the option to quit Safari. You will likely have to force quit Safari. To do this, press Command + option + esc, select Safari, and press Force Quit.
Relaunch Safari
If you relaunch Safari, the page will reopen. To prevent this from happening, hold down the 'Shift' key while opening Safari. This will prevent windows from the last time Safari was running from reopening.
This will not work in all cases. The shift key must be held at the right time, and in some cases, even if done correctly, the window reappears. In these circumstances, after force quitting Safari, turn off Wi-Fi or disconnect Ethernet, depending on how you connect to the Internet. Then relaunch Safari normally. It will try to reload the malicious webpage, but without a connection, it won't be able to. Navigate away from that page by entering a different URL, i.e. www.apple.com, and trying to load it. Now you can reconnect to the Internet, and the page you entered will appear rather than the malicious one.
An excellent link to read is Tom Reed's Mac Malware Guide.
Also, visit The XLab FAQs and read Detecting and avoiding malware and spyware.
See these Apple articles:
Mac OS X Snow Leopard and malware detection
OS X Lion- Protect your Mac from malware
OS X Mountain Lion- Protect your Mac from malware
OS X Mavericks- Protect your Mac from malware
About file quarantine in OS X
If you require anti-virus protection Thomas Reed recommends using ClamXAV. (Thank you to Thomas Reed for this recommendation.) -
VERY slow performance with CS4 + Save for web
Note: I have done a search for similar issues but can find nothing regarding CS4 and this particular issue. I'm using a MacBook Pro 2.4Ghz w/4GB of RAM and resources are aplenty when the issue occurs.
Issue
My problem is that under certain circumstances the 'save as web' function can take upto 3 minutes before the diaglog box appears. I've had this for some time but only in the last couple of days did I notice something that might be relevant:
Works
1. Open 3 large TIFF files @ 120mb approx (mine are 3 processed RAW files from Capture One / 4200x5600@300dpi)
2. Create a new adjustment layer for each image
3. Resize each image to 72dpi @ 800x600
4. Run a SmartSharpen & flatten layers
5. In each tab (for each image) do 'save as web'
6. 'Save as web' dialog appears in expected time
VERY slow
1. Open 3 large TIFF files @ 120mb approx (mine are 3 processed RAW files from Capture One / 4200x5600@300dpi)
2. Create a new adjustment layer for each image
3. Resize each image to 72dpi @ 800x600
4. Run a SmartSharpen & flatten layers for each image
5. In first tab do 'save as web'
6. 'Save as web' dialog appears in expected time
7. Close this document (tab)
8. Go to the next image (tab) and do 'save as web'
9. Dialog box can take anything from 20secs to 3mins to appear.
10. Close this document (tab)
11. Go to the last image (tab) and do 'save as web'
12. Dialog box can take anything from 20secs to 3mins to appear.
As I can easily go through this process for 50-60 images you can imagine that it can waste over an hour of my time waiting for Photoshop to get it's act together. I assume it's something todo with memory allocation, or that it's processing previews for all three tabs on the first 'save as web', but in any respect it's very annoying. There seems nothing obviously wrong resource-wise at the time of doing these.
Would be interested if anyone else has this issue!
Thanks!I had the same problem when I setup a new computer this week. Here's what I had installed:
Photoshop CS5
Suitcase Fusion 3
The problem was that when I was in Photoshop and used the "Save for Web" export screen, the dropdown menu for the different export types (JPG, PNG, GIF, etc) would take an extremely long time to update the preview of the graphic.
After a few days of research , I found that Suitcase was conflicting with Photoshop. Here's how you fix the problem (or at least here's what I did with my situation):
Open Suitcase
Go to "Tools", click "Manage Plugins"
Deactivate the Photoshop plugin
This fixed the problem immediately and now my Photoshop" Save For Web" feature is working really fast. Hope this helps anyone else in the same boat. -
So I just bought a great condition Macbook pro 17" with 2gb of ram, and the last owner upgraded the HD to a 500gb toshiba 5400rpm HD....the computer is VERY slow....when loading up anything it take forever, and watching video's freezes it for a few seconds then starts for a 1-3 seconds then freezes again....what can I do? I really like the laptop, but hate the performance...and I don't want to go buy another one....but I have considered a SSD....any idea's before I do that?
Thanks.How much hard drive space do you have left?
Sluggish Finder - Bunch of icons on your desktop? An overcrowded desktop slows down your Mac.
Get rid of needless Finder calculations - Open a window in Finder/View/Show View Options: ensure "Calculate All Sizes" option is unchecked.
Internet related - It's likely that your broadband connection is the bottleneck. You can check your speed on http://www.speedtest.net to see how fast your connection is. If your web browser specifically performs slowly, quit and relaunch it.
If browser remains sluggish, empty its cache.
Safari/Empty Cache
Firefox/Preferences - select the Network tab of the Advanced preferences and click the "Clear Now" button in the "Offline Storage" area.
Application related - Launch "Activity Monitor" - Applications/Utilities - click the CPU heading and see what float to the top. If an application takes up a large chunk of CPU and won't let it go, it could be dragging down your Mac's performance. Quit it by clicking the Quit Process button at the top of the Activity Monitor window.
Too little ram - max out your ram. -
Very slow connection with db2 ver 9.1 client on win2000
I have been having difficulty in diagnosing why when after installing db2 9.1 fp5 client on our wind2000 box which has Crystal Embedded 10 RAS ( service pack 6 ) running, the reports that i am invoking using the Java SDK ( we have an online J2ee web application ) are very slow. I have narrowed the problem area down to where the java sdk is trying to set the table location.
Using the db2 7.1 client since 2005, we have not had this issue. We must upgrade to ver 9.1 db2 since this is being done at an enterprise level. I upgraded our test server to 9.1 and noticed this slowness. With the 7.1 db2 client and the same RAS server, the reports take about 2 or 3 seconds but with the 9.1 client the reports take about 40+ seconds each and this is always as the setTableLocation method. Once is goes through this, the rest runs fine.
I have tested this with a local db2 datbase on windows, a remote db2 database 3000 miles away ( same as with what the 71 client runs against) and it is consistently the same response time.
I did notice that if I ran my java online on the same server as the RAS server, the response time is great. This only seems to be happenning when the java app is not on the same server as the RAS server.
I also have a java stub that does not run in a web container. in this case, with the same code and the same databases, whether i am local or remote from the crystal server, the response time is 40+ seconds to connect.
The .rpt files are developed via Crystal Reports 10 and we develop on a local database and we modify the database credentials throught the SDK as we deploy upto production. I have also tried this with the same database we developed with and the same 40+ seconds connect time.
All of these scenarios work fine with the 7.1 client.
so it seems there is some connection issue with the 9.1 client only.
Need help urgently.I have exactly the same issue.
-
Very slow working with eps files over new network
Please help!!!
Our IT has recently upgraded us from a OSX server to a 2 Terabyte SNAP SERVER 520.
I am using the only INTEL Mac in the department (we have another 10+ G5 PPCs running 10.4), and the only one using OSX 10.5. Since changing to the new server, I am also the only one with several file saving/opening issues.
I believe this is a network issue.
It is with mostly ADOBE products and we all know they will not support, working over the network. Due to the volume of files, I simply cannot drag files to my HD, and work locally. It is not practical. I also know that we have not had any issues in the past, and don't see why I can't get to the root of the problem.
**The most obvious issue is Illustrator .eps files.**
I can open and save .ai files in good time both locally, and over the network. There is no difference either way. HOWEVER, if it is an .eps file working over the network is not practical. I get the spinning wheel for about 2 minutes each time I open, save, or make a change. It is VERY slow. Working on eps files locally is fine (about the same speed as .ai files), but as soon as it hits the server, it is painfully slow to do anything.
Additionally, when saving Photoshop, Illustrator, InDesign AND Quark 7 files (direct to the network), I am regularly getting "Could not save because write access was not granted", or "Could not save becasue unexpected end-of-file was encountered", or "Could not save because the file is already in use or as left open" type errors.
I simply then click 'OK', and then hit save again, and it either gives me the same message, or it goes into 'save as' mode which lets me save the file (same name, and same location, but the original file has disappeared).
I am connected to the server IP address through afp:// but have also tried cifs://. IT have removed all access to the server through smb://, so I cannot try this.
ANY help is appreciated.With regard to the EPS issue, I think I may have found the source of the problem for SMB users: the Suitcase Fusion plug-in.
Did you make any progress on these issues? -
I don't know if other people also have this problem, but I noticed an issue which makes Photoshop CS5 completely useless for me: It is scrolling incredibly slow. With CS4 I am able to scroll much faster and with different speeds. In CS5 it seems like the speed is limited. No matter how much I scroll with my mouse, Photoshop keeps scrolling at the same speed.
It seems like it is not only me: The only website concerning this problem I was able to find is:
http://macperformanceguide.com/OptimizingPhotoshopCS5-Issues.html
Unacceptable scrolling speed with center button
I use the scroll wheel in the center of the Apple mouse constantly. In CS5, this functionality is now broken, because CS5 scrolls only a small amount, very different from CS4. There is no apparent work-around.
Reader Joe N agrees:
I saw your posting about CS5 issues, and I want to add another STRONG vote for the Photoshop mouse wheel scrolling speed issue. I use a Magic Mouse, and the scrolling speed is so poor in PS CS5 that it is totally blocking my creative flow. I have scoured the web for a solution and have not found anything yet...
I also use a Magic Mouse and a MacBook Pro with Snow Leopard. Is there any hope of a fix or a workaround?Thanks so much for replying, Chris. I've just started using CS5 and only used CS4 for a couple of weeks. There are so many variables. and I don't think it's just Photoshop. I'm wondering if the same problems happen in windows 7 (I switched to the Mac the last time I bought a computer.) Probably it's just that everything gets more complicated along with the improvements. : -(
Thanks again,
Peggy -
2.4GHZ clients very slow speeds with AP3600
5508 WLC (7.5.102)
AP36021
We currently have a test WiFi SSID setup that uses basic mac filtering on our WLC's
WLAN is configured with WPA and WPA2 L2 Security with WPA Policy and WPA2 Encryption.
For some reason we seem to be getting very slow speeds on clients with 2.4GHZ
for example speedtest.net I get 70mg upload and 65mg download on 5GHZ devices and about 1-3mg download and 1mg upload for 2.4GZ devices!
AP36021 are dual band with 4 channels (2 x 2.4Ghz and 2 x 5Ghz)
fyi - There are no dropped packets on the client stats via Prime mgmt that use 2.4GHZ
Any ideas here?Foreign Primary WLC (let me know if you need the Anchor controller ouput as well)
We have 3 ports configured as 0/12 trunked
interface GigabitEthernet0/12
description + WLC ****
switchport access vlan 999
switchport trunk encapsulation dot1q
switchport trunk native vlan 999
switchport trunk allowed vlan 10,30,40
switchport mode trunk
switchport nonegotiate
load-interval 30
no cdp enable
channel-group 3 mode on
spanning-tree portfast
end
Building configuration...
Current configuration : 330 bytes
interface Port-channel3
description + WLC ****
switchport access vlan 999
switchport trunk encapsulation dot1q
switchport trunk native vlan 999
switchport trunk allowed vlan 10,30,40
switchport mode trunk
switchport nonegotiate
logging event trunk-status
logging event bundle-status
load-interval 30
end
AP switch port config
Building configuration...
Current configuration : 617 bytes
interface GigabitEthernet4/32
description AP36021
switchport
switchport access vlan 30
switchport mode access
switchport voice vlan 20
load-interval 30
speed auto 10 100
wrr-queue bandwidth 5 90 5
wrr-queue queue-limit 5 80 5
wrr-queue random-detect min-threshold 2 70 100 100 100 100 100 100 100
wrr-queue random-detect min-threshold 3 70 100 100 100 100 100 100 100
wrr-queue random-detect max-threshold 2 100 100 100 100 100 100 100 100
wrr-queue cos-map 2 1 0 1 2 4
wrr-queue cos-map 3 1 3 6 7
no snmp trap link-status
mls qos trust cos
no mdix auto
spanning-tree portfast
end
show wlan 4
WLAN Identifier.................................. 4
Profile Name..................................... WLKPV
Network Name (SSID).............................. WLKPV
Status........................................... Enabled
MAC Filtering.................................... Enabled
Broadcast SSID................................... Enabled
AAA Policy Override.............................. Disabled
Network Admission Control
Client Profiling Status
Radius Profiling ............................ Disabled
DHCP ....................................... Disabled
HTTP ....................................... Disabled
Local Profiling ............................. Disabled
DHCP ....................................... Disabled
HTTP ....................................... Disabled
Radius-NAC State............................... Disabled
SNMP-NAC State................................. Disabled
Quarantine VLAN................................ 0
Maximum number of Associated Clients............. 0
Maximum number of Clients per AP Radio........... 200
--More-- or (q)uit
Number of Active Clients......................... 21
Exclusionlist Timeout............................ 60 seconds
Session Timeout.................................. 7200 seconds
User Idle Timeout................................ Disabled
Sleep Client..................................... disable
Sleep Client Timeout............................. 12 hours
User Idle Threshold.............................. 0 Bytes
NAS-identifier................................... hellotest
CHD per WLAN..................................... Enabled
Webauth DHCP exclusion........................... Disabled
Interface........................................ new-byod
Multicast Interface.............................. Not Configured
WLAN IPv4 ACL.................................... unconfigured
WLAN IPv6 ACL.................................... unconfigured
WLAN Layer2 ACL.................................. unconfigured
mDNS Status...................................... Enabled
mDNS Profile Name................................ default-mdns-profile
DHCP Server...................................... Default
DHCP Address Assignment Required................. Disabled
Static IP client tunneling....................... Disabled
PMIPv6 Mobility Type............................. none
PMIPv6 MAG Profile........................... Unconfigured
PMIPv6 Default Realm......................... Unconfigured
--More-- or (q)uit
PMIPv6 NAI Type.............................. Hexadecimal
Quality of Service............................... Silver
Per-SSID Rate Limits............................. Upstream Downstream
Average Data Rate................................ 0 0
Average Realtime Data Rate....................... 0 0
Burst Data Rate.................................. 0 0
Burst Realtime Data Rate......................... 0 0
Per-Client Rate Limits........................... Upstream Downstream
Average Data Rate................................ 0 0
Average Realtime Data Rate....................... 0 0
Burst Data Rate.................................. 0 0
Burst Realtime Data Rate......................... 0 0
Scan Defer Priority.............................. 4,5,6
Scan Defer Time.................................. 100 milliseconds
WMM.............................................. Allowed
WMM UAPSD Compliant Client Support............... Disabled
Media Stream Multicast-direct.................... Disabled
CCX - AironetIe Support.......................... Enabled
CCX - Gratuitous ProbeResponse (GPR)............. Disabled
CCX - Diagnostics Channel Capability............. Disabled
Dot11-Phone Mode (7920).......................... Disabled
Wired Protocol................................... None
Passive Client Feature........................... Disabled
--More-- or (q)uit
Peer-to-Peer Blocking Action..................... Disabled
Radio Policy..................................... All
DTIM period for 802.11a radio.................... 1
DTIM period for 802.11b radio.................... 1
Radius Servers
Authentication................................ Global Servers
Accounting.................................... Global Servers
Interim Update............................. Disabled
Framed IPv6 Acct AVP ...................... Prefix
Dynamic Interface............................. Disabled
Dynamic Interface Priority.................... wlan
Local EAP Authentication......................... Disabled
Security
802.11 Authentication:........................ Open System
FT Support.................................... Disabled
Static WEP Keys............................... Disabled
802.1X........................................ Disabled
Wi-Fi Protected Access (WPA/WPA2)............. Enabled
WPA (SSN IE)............................... Disabled
WPA2 (RSN IE).............................. Enabled
TKIP Cipher............................. Disabled
AES Cipher.............................. Enabled
--More-- or (q)uit
Auth Key Management
802.1x.................................. Disabled
PSK..................................... Enabled
CCKM.................................... Disabled
FT-1X(802.11r).......................... Disabled
FT-PSK(802.11r)......................... Disabled
PMF-1X(802.11w)......................... Disabled
PMF-PSK(802.11w)........................ Disabled
FT Reassociation Timeout................... 20
FT Over-The-DS mode........................ Enabled
GTK Randomization.......................... Disabled
SKC Cache Support.......................... Disabled
CCKM TSF Tolerance......................... 1000
WAPI.......................................... Disabled
Wi-Fi Direct policy configured................ Disabled
EAP-Passthrough............................... Disabled
CKIP ......................................... Disabled
Web Based Authentication...................... Disabled
Web-Passthrough............................... Disabled
Conditional Web Redirect...................... Disabled
Splash-Page Web Redirect...................... Disabled
Auto Anchor................................... Enabled
FlexConnect Local Switching................... Disabled
--More-- or (q)uit
flexconnect Central Dhcp Flag................. Disabled
flexconnect nat-pat Flag...................... Disabled
flexconnect Dns Override Flag................. Disabled
flexconnect PPPoE pass-through................ Disabled
flexconnect local-switching IP-source-guar.... Disabled
FlexConnect Vlan based Central Switching ..... Disabled
FlexConnect Local Authentication.............. Disabled
FlexConnect Learn IP Address.................. Enabled
Client MFP.................................... Optional
PMF........................................... Disabled
PMF Association Comeback Time................. 1
PMF SA Query RetryTimeout..................... 200
Tkip MIC Countermeasure Hold-down Timer....... 60
AVC Visibilty.................................... Disabled
AVC Profile Name................................. None
Flow Monitor Name................................ None
Split Tunnel (Printers).......................... Disabled
Call Snooping.................................... Disabled
Roamed Call Re-Anchor Policy..................... Disabled
SIP CAC Fail Send-486-Busy Policy................ Enabled
SIP CAC Fail Send Dis-Association Policy......... Disabled
KTS based CAC Policy............................. Disabled
Assisted Roaming Prediction Optimization......... Disabled
--More-- or (q)uit
802.11k Neighbor List............................ Disabled
802.11k Neighbor List Dual Band.................. Disabled
Band Select...................................... Disabled
Load Balancing................................... Disabled
Multicast Buffer................................. Disabled
Mobility Anchor List
WLAN ID IP Address Status
4 10.x.x.x Up
4 10.x.x.x Up
802.11u........................................ Disabled
MSAP Services.................................. Disabled -
Dreamweaver CC opening files very slow iMac with Fusion drive
I am working on a small website based off on Bootstrap 3. Now that I am almost done with the project opening files take a few seconds to open them (in code view). I have tried the various fixes like resolveremoteurltoipaddress=FALSE but still the files load very slow. On my Windows Machine it loads very fast and that machine is 4 years old. The iMac I am using at work is the latest version with decked out specs and only Dreamweaver CC and Edge Code have very slow opening of files. Creating new documents inside Dreamweaver CC is fast. Is there a way to make Dreamweaver open files faster? How to make it load faster, open documents faster, especially in code view. My initial thought is maybe its because I am linking to a few JS library like TypeKit and jQuery but I have not experience these problems on my Windows PC. Any help would be appreciated.
I am working on a small website based off on Bootstrap 3. Now that I am almost done with the project opening files take a few seconds to open them (in code view). I have tried the various fixes like resolveremoteurltoipaddress=FALSE but still the files load very slow. On my Windows Machine it loads very fast and that machine is 4 years old. The iMac I am using at work is the latest version with decked out specs and only Dreamweaver CC and Edge Code have very slow opening of files. Creating new documents inside Dreamweaver CC is fast. Is there a way to make Dreamweaver open files faster? How to make it load faster, open documents faster, especially in code view. My initial thought is maybe its because I am linking to a few JS library like TypeKit and jQuery but I have not experience these problems on my Windows PC. Any help would be appreciated.
-
Apple TV song streaming interrupted, very slow sync with keynote
When I try to play a song or a playlist from iphone (4S and 5) or ipad (mini) via Airplay on Apple Tv, the music is interrupted several times, sometimes the first track, sometimes after 3 track, no rules. Wifi signal is good.
Other issue with Keynote on the iPad. I am trying to mirror a deck but it is very slow, I have to wait 2 to 3 sec between each slide
can someone help me?
thank youThanks for the reply. I used iStumbler on the MacBook Pro and could see three other networks besides my own, and they were all on Channel 11. Mine is on Channel 6 and, given there's no overlap between channels that are separated by 5 channels or more, there should be no interference.
However, the Apple TV reports more channels than iStumbler does and there's no way to know what channel they're on. (Hmmmm, maybe I should move the Mac to the vicinity of the ATV 2.)
However, my local network is involved when the MacBook Pro connects to the internet - I'm using Wi-Fi, not Ethernet - so, if the MacBook Pro can upload at 1MB/sec. to the internet (and that's throttled), why is it uploading at 50-100KB/sec. to the ATV 2?
Steve = : ^ ) -
Ftp is very slow locally with intel solaris 8 with 98 se buffalo ( 100mps)
why? what to check? ping ok.
3 com 3c905b card installed with solaris 8 connected with linksys router.
Buffalo installed in 98 se 100 mps
cable modem with dynamic ip.
I have tried FTP in 98 SE with LINUX 6.0 RH via LINKSYS router with ver 1.37 ( 1.37 is even worser than 1.36-because the status is not refresh but itself) is ok.
but 98SE with intel solaris 8 is very slow with wu-ftp(ipswitch) 1%, then 1%....etc an hour later still 1%. I shut down the solaris try a few times, then it is ok. all connection is tight.
some one said::
The most common mistake that causes bad throughput is mixing
full-duplex and half-duplex stations on the same LAN.
HOWTO solve full-duplex and half -duplex??
thanks for your attention!
SUN learner.why? what to check? ping ok.
3 com 3c905b card installed with solaris 8 connected with linksys router.
Buffalo installed in 98 se 100 mps
cable modem with dynamic ip.
I have tried FTP in 98 SE with LINUX 6.0 RH via LINKSYS router with ver 1.37 ( 1.37 is even worser than 1.36-because the status is not refresh but itself) is ok.
but 98SE with intel solaris 8 is very slow with wu-ftp(ipswitch) 1%, then 1%....etc an hour later still 1%. I shut down the solaris try a few times, then it is ok. all connection is tight.
some one said::
The most common mistake that causes bad throughput is mixing
full-duplex and half-duplex stations on the same LAN.
HOWTO solve full-duplex and half -duplex??
thanks for your attention!
SUN learner. -
Very Slow Query with CTE inner join
I have 2 tables (heavily simplified here to show relevant columns):
CREATE TABLE tblCharge
(ChargeID int NOT NULL,
ParentChargeID int NULL,
ChargeName varchar(200) NULL)
CREATE TABLE tblChargeShare
(ChargeShareID int NOT NULL,
ChargeID int NOT NULL,
TotalAmount money NOT NULL,
TaxAmount money NULL,
DiscountAmount money NULL,
CustomerID int NOT NULL,
ChargeShareStatusID int NOT NULL)
I have a very basic View to Join them:
CREATE VIEW vwBASEChargeShareRelation as
Select c.ChargeID, ParentChargeID, s.CustomerID, s.TotalAmount, isnull(s.TaxAmount, 0) as TaxAmount, isnull(s.DiscountAmount, 0) as DiscountAmount
from tblCharge c inner join tblChargeShare s
on c.ChargeID = s.ChargeID Where s.ChargeShareStatusID < 3
GO
I then have a view containing a CTE to get the children of the Parent Charge:
ALTER VIEW [vwChargeShareSubCharges] AS
WITH RCTE AS
SELECT ParentChargeId, ChargeID, 1 AS Lvl, ISNULL(TotalAmount, 0) as TotalAmount, ISNULL(TaxAmount, 0) as TaxAmount,
ISNULL(DiscountAmount, 0) as DiscountAmount, CustomerID, ChargeID as MasterChargeID
FROM vwBASEChargeShareRelation Where ParentChargeID is NULL
UNION ALL
SELECT rh.ParentChargeID, rh.ChargeID, Lvl+1 AS Lvl, ISNULL(rh.TotalAmount, 0), ISNULL(rh.TaxAmount, 0), ISNULL(rh.DiscountAmount, 0) , rh.CustomerID
, rc.MasterChargeID
FROM vwBASEChargeShareRelation rh
INNER JOIN RCTE rc ON rh.PArentChargeID = rc.ChargeID and rh.CustomerID = rc.CustomerID
Select MasterChargeID as ChargeID, CustomerID, Sum(TotalAmount) as TotalCharged, Sum(TaxAmount) as TotalTax, Sum(DiscountAmount) as TotalDiscount
from RCTE
Group by MasterChargeID, CustomerID
GO
So far so good, I can query this view and get the total cost for a line item including all children.
The problem occurs when I join this table. The query:
Select t.* from vwChargeShareSubCharges t
inner join
tblChargeShare s
on t.CustomerID = s.CustomerID
and t.MasterChargeID = s.ChargeID
Where s.ChargeID = 1291094
Takes around 30 ms to return a result (tblCharge and Charge Share have around 3.5 million records).
But the query:
Select t.* from vwChargeShareSubCharges t
inner join
tblChargeShare s
on t.CustomerID = s.CustomerID
and t.MasterChargeID = s.ChargeID
Where InvoiceID = 1045854
Takes around 2 minutes to return a result - even though the only charge with that InvoiceID is the same charge as the one used in the previous query.
The same thing occurs if I do the join in the same query that the CTE is defined in.
I ran the execution plan for each query. The first (fast) query looks like this:
The second(slow) query looks like this:
I am at a loss, and my skills at decoding execution plans to resolve this are lacking.
I have separate indexes on tblCharge.ChargeID, tblCharge.ParentChargeID, tblChargeShare.ChargeID, tblChargeShare.InvoiceID, tblChargeShare.ChargeShareStatusID
Any ideas? Tested on SQL 2008R2 and SQL 2012>> The database is linked [sic] to an established app and the column and table names can't be changed. <<
Link? That is a term from pointer chains and network databases, not SQL. I will guess that means the app came back in the old pre-RDBMS days and you are screwed.
>> I am not too worried about the money field [sic], this is used for money and money based calculations so the precision and rounding are acceptable at this level. <<
Field is a COBOL concept; columns are totally different. MONEY is how Sybase mimics the PICTURE clause that puts currency signs, commas, period, etc in a COBOL money field.
Using more than one operation (multiplication or division) on money columns will produce severe rounding errors. A simple way to visualize money arithmetic is to place a ROUND() function calls after
every operation. For example,
Amount = (Portion / total_amt) * gross_amt
can be rewritten using money arithmetic as:
Amount = ROUND(ROUND(Portion/total_amt, 4) *
gross_amt, 4)
Rounding to four decimal places might not seem an
issue, until the numbers you are using are greater
than 10,000.
BEGIN
DECLARE @gross_amt MONEY,
@total_amt MONEY,
@my_part MONEY,
@money_result MONEY,
@float_result FLOAT,
@all_floats FLOAT;
SET @gross_amt = 55294.72;
SET @total_amt = 7328.75;
SET @my_part = 1793.33;
SET @money_result = (@my_part / @total_amt) *
@gross_amt;
SET @float_result = (@my_part / @total_amt) *
@gross_amt;
SET @Retult3 = (CAST(@my_part AS FLOAT)
/ CAST( @total_amt AS FLOAT))
* CAST(FLOAT, @gross_amt AS FLOAT);
SELECT @money_result, @float_result, @all_floats;
END;
@money_result = 13525.09 -- incorrect
@float_result = 13525.0885 -- incorrect
@all_floats = 13530.5038673171 -- correct, with a -
5.42 error
>> The keys are ChargeID(int, identity) and ChargeShareID(int, identity). <<
Sorry, but IDENTITY is not relational and cannot be a key by definition. But it sure works just like a record number in your old COBOL file system.
>> .. these need to be int so that they are assigned by the database and unique. <<
No, the data type of a key is not determined by physical storage, but by logical design. IDENTITY is the number of a parking space in a garage; a VIN is how you identify the automobile.
>> What would you recommend I use as keys? <<
I do not know. I have no specs and without that, I cannot pull a Kabbalah number from the hardware. Your magic numbers can identify Squids, Automobile or Lady Gaga! I would ask the accounting department how they identify a charge.
>> Charge_Share_Status_ID links [sic] to another table which contains the name, formatting [sic] and other information [sic] or a charge share's status, so it is both an Id and a status. <<
More pointer chains! Formatting? Unh? In RDBMS, we use a tiered architecture. That means display formatting is in a presentation layer. A properly created table has cohesion – it does one and only one data element. A status is a state of being that applies
to an entity over a period time (think employment, marriage, etc. status if that is too abstract).
An identifier is based on the Law of Identity from formal logic “To be is to be something in particular” or “A is A” informally. There is no entity here! The Charge_Share_Status table should have the encoded values for a status and perhaps a description if
they are unclear. If the list of values is clear, short and static, then use a CHECK() constraint.
On a scale from 1 to 10, what color is your favorite letter of the alphabet? Yes, this is literally that silly and wrong.
>> I understand what a CTE is; is there a better way to sum all children for a parent hierarchy? <<
There are many ways to represent a tree or hierarchy in SQL. This is called an adjacency list model and it looks like this:
CREATE TABLE OrgChart
(emp_name CHAR(10) NOT NULL PRIMARY KEY,
boss_emp_name CHAR(10) REFERENCES OrgChart(emp_name),
salary_amt DECIMAL(6,2) DEFAULT 100.00 NOT NULL,
<< horrible cycle constraints >>);
OrgChart
emp_name boss_emp_name salary_amt
==============================
'Albert' NULL 1000.00
'Bert' 'Albert' 900.00
'Chuck' 'Albert' 900.00
'Donna' 'Chuck' 800.00
'Eddie' 'Chuck' 700.00
'Fred' 'Chuck' 600.00
This approach will wind up with really ugly code -- CTEs hiding recursive procedures, horrible cycle prevention code, etc. The root of your problem is not knowing that rows are not records, that SQL uses sets and trying to fake pointer chains with some
vague, magical non-relational "id".
This matches the way we did it in old file systems with pointer chains. Non-RDBMS programmers are comfortable with it because it looks familiar -- it looks like records and not rows.
Another way of representing trees is to show them as nested sets.
Since SQL is a set oriented language, this is a better model than the usual adjacency list approach you see in most text books. Let us define a simple OrgChart table like this.
CREATE TABLE OrgChart
(emp_name CHAR(10) NOT NULL PRIMARY KEY,
lft INTEGER NOT NULL UNIQUE CHECK (lft > 0),
rgt INTEGER NOT NULL UNIQUE CHECK (rgt > 1),
CONSTRAINT order_okay CHECK (lft < rgt));
OrgChart
emp_name lft rgt
======================
'Albert' 1 12
'Bert' 2 3
'Chuck' 4 11
'Donna' 5 6
'Eddie' 7 8
'Fred' 9 10
The (lft, rgt) pairs are like tags in a mark-up language, or parens in algebra, BEGIN-END blocks in Algol-family programming languages, etc. -- they bracket a sub-set. This is a set-oriented approach to trees in a set-oriented language.
The organizational chart would look like this as a directed graph:
Albert (1, 12)
Bert (2, 3) Chuck (4, 11)
/ | \
/ | \
/ | \
/ | \
Donna (5, 6) Eddie (7, 8) Fred (9, 10)
The adjacency list table is denormalized in several ways. We are modeling both the Personnel and the Organizational chart in one table. But for the sake of saving space, pretend that the names are job titles and that we have another table which describes the
Personnel that hold those positions.
Another problem with the adjacency list model is that the boss_emp_name and employee columns are the same kind of thing (i.e. identifiers of personnel), and therefore should be shown in only one column in a normalized table. To prove that this is not
normalized, assume that "Chuck" changes his name to "Charles"; you have to change his name in both columns and several places. The defining characteristic of a normalized table is that you have one fact, one place, one time.
The final problem is that the adjacency list model does not model subordination. Authority flows downhill in a hierarchy, but If I fire Chuck, I disconnect all of his subordinates from Albert. There are situations (i.e. water pipes) where this is true, but
that is not the expected situation in this case.
To show a tree as nested sets, replace the nodes with ovals, and then nest subordinate ovals inside each other. The root will be the largest oval and will contain every other node. The leaf nodes will be the innermost ovals with nothing else inside them
and the nesting will show the hierarchical relationship. The (lft, rgt) columns (I cannot use the reserved words LEFT and RIGHT in SQL) are what show the nesting. This is like XML, HTML or parentheses.
At this point, the boss_emp_name column is both redundant and denormalized, so it can be dropped. Also, note that the tree structure can be kept in one table and all the information about a node can be put in a second table and they can be joined on employee
number for queries.
To convert the graph into a nested sets model think of a little worm crawling along the tree. The worm starts at the top, the root, makes a complete trip around the tree. When he comes to a node, he puts a number in the cell on the side that he is visiting
and increments his counter. Each node will get two numbers, one of the right side and one for the left. Computer Science majors will recognize this as a modified preorder tree traversal algorithm. Finally, drop the unneeded OrgChart.boss_emp_name column
which used to represent the edges of a graph.
This has some predictable results that we can use for building queries. The root is always (left = 1, right = 2 * (SELECT COUNT(*) FROM TreeTable)); leaf nodes always have (left + 1 = right); subtrees are defined by the BETWEEN predicate; etc. Here are
two common queries which can be used to build others:
1. An employee and all their Supervisors, no matter how deep the tree.
SELECT O2.*
FROM OrgChart AS O1, OrgChart AS O2
WHERE O1.lft BETWEEN O2.lft AND O2.rgt
AND O1.emp_name = :in_emp_name;
2. The employee and all their subordinates. There is a nice symmetry here.
SELECT O1.*
FROM OrgChart AS O1, OrgChart AS O2
WHERE O1.lft BETWEEN O2.lft AND O2.rgt
AND O2.emp_name = :in_emp_name;
3. Add a GROUP BY and aggregate functions to these basic queries and you have hierarchical reports. For example, the total salaries which each employee controls:
SELECT O2.emp_name, SUM(S1.salary_amt)
FROM OrgChart AS O1, OrgChart AS O2,
Salaries AS S1
WHERE O1.lft BETWEEN O2.lft AND O2.rgt
AND S1.emp_name = O2.emp_name
GROUP BY O2.emp_name;
4. To find the level and the size of the subtree rooted at each emp_name, so you can print the tree as an indented listing.
SELECT O1.emp_name,
SUM(CASE WHEN O2.lft BETWEEN O1.lft AND O1.rgt
THEN O2.sale_amt ELSE 0.00 END) AS sale_amt_tot,
SUM(CASE WHEN O2.lft BETWEEN O1.lft AND O1.rgt
THEN 1 ELSE 0 END) AS subtree_size,
SUM(CASE WHEN O1.lft BETWEEN O2.lft AND O2.rgt
THEN 1 ELSE 0 END) AS lvl
FROM OrgChart AS O1, OrgChart AS O2
GROUP BY O1.emp_name;
5. The nested set model has an implied ordering of siblings which the adjacency list model does not. To insert a new node, G1, under part G. We can insert one node at a time like this:
BEGIN ATOMIC
DECLARE rightmost_spread INTEGER;
SET rightmost_spread
= (SELECT rgt
FROM Frammis
WHERE part = 'G');
UPDATE Frammis
SET lft = CASE WHEN lft > rightmost_spread
THEN lft + 2
ELSE lft END,
rgt = CASE WHEN rgt >= rightmost_spread
THEN rgt + 2
ELSE rgt END
WHERE rgt >= rightmost_spread;
INSERT INTO Frammis (part, lft, rgt)
VALUES ('G1', rightmost_spread, (rightmost_spread + 1));
COMMIT WORK;
END;
The idea is to spread the (lft, rgt) numbers after the youngest child of the parent, G in this case, over by two to make room for the new addition, G1. This procedure will add the new node to the rightmost child position, which helps to preserve the idea
of an age order among the siblings.
6. To convert a nested sets model into an adjacency list model:
SELECT B.emp_name AS boss_emp_name, E.emp_name
FROM OrgChart AS E
LEFT OUTER JOIN
OrgChart AS B
ON B.lft
= (SELECT MAX(lft)
FROM OrgChart AS S
WHERE E.lft > S.lft
AND E.lft < S.rgt);
7. To find the immediate parent of a node:
SELECT MAX(P2.lft), MIN(P2.rgt)
FROM Personnel AS P1, Personnel AS P2
WHERE P1.lft BETWEEN P2.lft AND P2.rgt
AND P1.emp_name = @my_emp_name;
I have a book on TREES & HIERARCHIES IN SQL which you can get at Amazon.com right now. It has a lot of other programming idioms for nested sets, like levels, structural comparisons, re-arrangement procedures, etc.
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL -
Very Slow performance with large files
Using iTunes with my AppleTV I've been in the slow and painful process of digitizing my dvd library and when converting the LOTR (extended edition) trilogy I ran into a problem post-conversion. They play fine in Quicktime 7.3.1, I can add them to the iTunes library but when attempting to edit any information within iTunes and attempting to save iTunes freezes for several minutes before working or crashing (odds are around 50/50). If I just add the file to the library and try to play it the movie doesn't show up on the AppleTV either which is even stranger.
Output format of the movie: MP4/H.264, native 720x480 resolution, 23.97fps, 2Mbps video stream, 128k audio stream(limit of winavi).
Output Size: 4.4GB
Length: 4hours 24minutes
Software versions: iTunes 7.3.1, QuickTime 7.3.1
OS: Windows XP Pro SP2(current patch level as of 7/15).Is possible than iTunes have 4 Gb folder limits. I'm trying put a little of light over the problem because iTunes Help don't said.
Cheers -
Radeonhd: very slow performance with 2D accel enabled
I have a Radeon HD 4850 in my desktop, and I'm having serious issues trying to get 2D support enabled with the radeonhd driver.
The driver works fine without EXA and DRI enabled. X seems smooth and snappy. I get a little tearing with X11 and Flash video, but I bought an ATi card; I kind of expect it. I see no discernable difference in performance between the radeon and radeonhd drivers.
However, if I turn the 2D accel options on, it feels like i'm using a pII or something. Windows tear all over the place, and everything in X slows waay down. I did some cursory seaching and it seems like this problem was solved a while ago and shouldn't show up in the up-to-date packages. I just ran pacman -Syu today; everything is synced.
I feel like I shouldn't be having these kinds of performance issues, which probably means I missed something somewhere when I was setting stuff up. I'm not a brand-new arch user but this card is new to me and I haven't fiddled with ATi drivers very much.
Anyone have any suggestions? I'm sort of at a loss here.
Last edited by f0nd004u (2009-10-08 10:33:13)drm-radeon-module-git-r6xx-r7xx refuses to compile, breaks at the end:
==> Starting make...
make DRM_MODULES=radeon.o modules
make[1]: Entering directory `/tmp/yaourt-tmp-josh/aur-drm-radeon-module-git-r6xx-r7xx/drm-radeon-module-git-r6xx-r7xx/src/drm-build/linux-core'
sh ../scripts/create_linux_pci_lists.sh < ../shared-core/drm_pciids.txt
make -C /lib/modules/2.6.30-ARCH/build SUBDIRS=`/bin/pwd` DRMSRCDIR=`/bin/pwd` modules
make[2]: Entering directory `/usr/src/linux-2.6.30-ARCH'
CC [M] /tmp/yaourt-tmp-josh/aur-drm-radeon-module-git-r6xx-r7xx/drm-radeon-module-git-r6xx-r7xx/src/drm-build/linux-core/drm_auth.o
In file included from /tmp/yaourt-tmp-josh/aur-drm-radeon-module-git-r6xx-r7xx/drm-radeon-module-git-r6xx-r7xx/src/drm-build/linux-core/drmP.h:84,
from /tmp/yaourt-tmp-josh/aur-drm-radeon-module-git-r6xx-r7xx/drm-radeon-module-git-r6xx-r7xx/src/drm-build/linux-core/drm_auth.c:36:
/tmp/yaourt-tmp-josh/aur-drm-radeon-module-git-r6xx-r7xx/drm-radeon-module-git-r6xx-r7xx/src/drm-build/linux-core/drm_os_linux.h:36: error: conflicting types for 'irqreturn_t'
include/linux/irqreturn.h:16: note: previous declaration of 'irqreturn_t' was here
make[3]: *** [/tmp/yaourt-tmp-josh/aur-drm-radeon-module-git-r6xx-r7xx/drm-radeon-module-git-r6xx-r7xx/src/drm-build/linux-core/drm_auth.o] Error 1
make[2]: *** [_module_/tmp/yaourt-tmp-josh/aur-drm-radeon-module-git-r6xx-r7xx/drm-radeon-module-git-r6xx-r7xx/src/drm-build/linux-core] Error 2
make[2]: Leaving directory `/usr/src/linux-2.6.30-ARCH'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/tmp/yaourt-tmp-josh/aur-drm-radeon-module-git-r6xx-r7xx/drm-radeon-module-git-r6xx-r7xx/src/drm-build/linux-core'
make: *** [radeon.o] Error 2
==> ERROR: Build Failed.
Aborting...
Error: Makepkg was unable to build drm-radeon-module-git-r6xx-r7xx package.
I'm not really sure what to make of that, and the driver definitely won't work without that module. Anyone got an idea?
*EDIT: Nevermind, I'm dumb and tired and didn't pay attention to make when I was building this.
Last edited by f0nd004u (2009-10-08 14:28:58)
Maybe you are looking for
-
ERROR: detected a problem with your audio configuration
I keep getting this error message when I try to open iTunes. I haven't changed anything on my pc, so not sure why I get this error. I was thinking of reinstalling iTunes, but was afraid I'd loose all my music that I have downloaded into iTunes (i.e.
-
Problem in converting into PDF
HI, I need to convert data in PDF format but i am facing problem in it. i have used 2 methods, 1. i used job_open,job_submit,job_close,BP_JOB_READ to submit job and CONVERT_ABAPSPOOLJOB_2_PDF to convert into pdf format. it is working fine in this cas
-
Html tags removed when #COLUMN_HEADER# is used in column template
Hi all, I'm using APEX 4.0.2, theme 2 Builder Blue. I am trying to add html tags to dynamically generated column headings of a dynamic SQL Report. When using a standard report template, the headings contain the html tags. However when I want to use o
-
Is it possible that a second person can manage the website on his own computer?
Is it possible that a second person can manage my website on his own computer?
-
Fastest way to get overset textframes
What is the fastest way to get overset Textframes?