The setMaxRows method of the ResultSet specifies how many rows a ResultSet can contain at a time. If there are 1000 eligible records in DB and setMaxRows has a value 100, so only 100 records would be loaded in ResultSet.
This can be particularly useful when we wish to limit the number of rows from DB.
Friday, June 11, 2010
Result Set Fetch Size
setFetchSize() in resultSet and Statement.
Both ResultSet and Statement have the SetFetchSize method. When used in the Statement all of the ResultSets returned by that Statement will have the same fetch size.
SetFetchSize determines the amount of data blocks or rows that should be carried to the client from the server after executing a statement.
Advantanges of using setFetchSize().
I did a comparitive study aout the impact of setting the fetch size when executing a query that resulted in about 1k records.
DB: Oracle 10g
Driver: oracle thin
Java version: 5
The database server was not in the local network.
The advantage is self evident.
Both ResultSet and Statement have the SetFetchSize method. When used in the Statement all of the ResultSets returned by that Statement will have the same fetch size.
SetFetchSize determines the amount of data blocks or rows that should be carried to the client from the server after executing a statement.
Advantanges of using setFetchSize().
I did a comparitive study aout the impact of setting the fetch size when executing a query that resulted in about 1k records.
DB: Oracle 10g
Driver: oracle thin
Java version: 5
The database server was not in the local network.
FetchSize | Time in entire processing: |
Default:0 | 31897ms |
10 | 31476ms |
100 | 6858ms |
500 | 5514ms |
The advantage is self evident.
Tuesday, June 8, 2010
Windows Access Commands
Accessibility Controls | access.cpl |
Add Hardware Wizard | hdwwiz.cpl |
Add/Remove Programs | appwiz.cpl |
Administrative Tools | control admintools |
Automatic Updates | wuaucpl.cpl |
Bluetooth Transfer Wizard | fsquirt |
Calculator | calc |
Certificate Manager | certmgr.msc |
Character Map | charmap |
Check Disk Utility | chkdsk |
Clipboard Viewer | clipbrd |
Command Prompt | cmd |
Component Services | dcomcnfg |
Computer Management | compmgmt.msc |
Date and Time Properties | timedate.cpl |
DDE Shares | ddeshare |
Device Manager | devmgmt.msc |
Direct X Control Panel (If Installed)* | directx.cpl |
Direct X Troubleshooter | dxdiag |
Disk Cleanup Utility | cleanmgr |
Disk Defragment | dfrg.msc |
Disk Management | diskmgmt.msc |
Disk Partition Manager | diskpart |
Display Properties | control desktop |
Display Properties | desk.cpl |
Display Properties (w/Appearance Tab Preselected) | control color |
Dr. Watson System Troubleshooting Utility | drwtsn32 |
Driver Verifier Utility | verifier |
Event Viewer | eventvwr.msc |
File Signature Verification Tool | sigverif |
Findfast | findfast.cpl |
Folders Properties | control folders |
Fonts | control fonts |
Fonts Folder | fonts |
Free Cell Card Game | freecell |
Game Controllers | joy.cpl |
Group Policy Editor (XP Prof) | gpedit.msc |
Hearts Card Game | mshearts |
Iexpress Wizard | iexpress |
Indexing Service | ciadv.msc |
Internet Properties | inetcpl.cpl |
IP Configuration (Display Connection Configuration) | ipconfig /all |
IP Configuration (Display DNS Cache Contents) | ipconfig /displaydns |
IP Configuration (Delete DNS Cache Contents) | ipconfig /flushdns |
IP Configuration (Release All Connections) | ipconfig /release |
IP Configuration (Renew All Connections) | ipconfig /renew |
IP Configuration (Refreshes DHCP & Re-Registers DNS) | ipconfig /registerdns |
IP Configuration (Display DHCP Class ID) | ipconfig /showclassid |
IP Configuration (Modifies DHCP Class ID) | ipconfig /setclassid |
Java Control Panel (If Installed) | jpicpl32.cpl |
Java Control Panel (If Installed) | javaws |
Keyboard Properties | control keyboard |
Local Security Settings | secpol.msc |
Local Users and Groups | lusrmgr.msc |
Logs You Out Of Windows | logoff |
Microsoft Chat | winchat |
Minesweeper Game | winmine |
Mouse Properties | control mouse |
Mouse Properties | main.cpl |
Network Connections | control netconnections |
Network Connections | ncpa.cpl |
Network Setup Wizard | netsetup.cpl |
Notepad | notepad |
Nview Desktop Manager (If Installed) | nvtuicpl.cpl |
Object Packager | packager |
ODBC Data Source Administrator | odbccp32.cpl |
On Screen Keyboard | osk |
Opens AC3 Filter (If Installed) | ac3filter.cpl |
Password Properties | password.cpl |
Performance Monitor | perfmon.msc |
Performance Monitor | perfmon |
Phone and Modem Options | telephon.cpl |
Power Configuration | powercfg.cpl |
Printers and Faxes | control printers |
Printers Folder | printers |
Private Character Editor | eudcedit |
Quicktime (If Installed) | QuickTime.cpl |
Regional Settings | intl.cpl |
Registry Editor | regedit |
Registry Editor | regedit32 |
Remote Desktop | mstsc |
Removable Storage | ntmsmgr.msc |
Removable Storage Operator Requests | ntmsoprq.msc |
Resultant Set of Policy (XP Prof) | rsop.msc |
Scanners and Cameras | sticpl.cpl |
Scheduled Tasks | control schedtasks |
Security Center | wscui.cpl |
Services | services.msc |
Shared Folders | fsmgmt.msc |
Shuts Down Windows | shutdown |
Sounds and Audio | mmsys.cpl |
Spider Solitare Card Game | spider |
SQL Client Configuration | cliconfg |
System Configuration Editor | sysedit |
System Configuration Utility | msconfig |
System File Checker Utility (Scan Immediately) | sfc /scannow |
System File Checker Utility (Scan Once At Next Boot) | sfc /scanonce |
System File Checker Utility (Scan On Every Boot) | sfc /scanboot |
System File Checker Utility (Return to Default Setting) | sfc /revert |
System File Checker Utility (Purge File Cache) | sfc /purgecache |
System File Checker Utility (Set Cache Size to size x) | sfc /cachesize=x |
System Properties | sysdm.cpl |
Task Manager | taskmgr |
Telnet Client | telnet |
User Account Management | nusrmgr.cpl |
Utility Manager | utilman |
Windows Firewall | firewall.cpl |
Windows Magnifier | magnify |
Windows Management Infrastructure | wmimgmt.msc |
Windows System Security Tool | syskey |
Windows Update Launches | wupdmgr |
Windows XP Tour Wizard | tourstart |
Wordpad | write |
Tuesday, May 20, 2008
Garbage Collection of String literals
Tapan/Saurabh
Your thoughts on this--Does the GC handle the String literals. Since the String literals are interned,Does this mean that GC would not collect these string literals. If it does how/when?
--Ramraj
Your thoughts on this--Does the GC handle the String literals. Since the String literals are interned,Does this mean that GC would not collect these string literals. If it does how/when?
--Ramraj
Monday, May 19, 2008
GC: JAVA 1.4
There are 3-4 algos specified by jvm 1.4 specifications. namely
reference counting
tracing
stop n copy
generational.
mark n sweep
Does JVM spec say that any of the above algo has the advantage over the other and the situations when one should be used and how do we use any one of them. Do we specify them somewhere as JAVA_OPTIONS?
--This is the first post. I'll detail about this thing later on.This post would serve as a startup for our blogs.
reference counting
tracing
stop n copy
generational.
mark n sweep
Does JVM spec say that any of the above algo has the advantage over the other and the situations when one should be used and how do we use any one of them. Do we specify them somewhere as JAVA_OPTIONS?
--This is the first post. I'll detail about this thing later on.This post would serve as a startup for our blogs.
Subscribe to:
Posts (Atom)