<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆 - 175  文章 - 202  trackbacks - 0
    <2012年6月>
    272829303112
    3456789
    10111213141516
    17181920212223
    24252627282930
    1234567

    第一個Blog,記錄哈哈的生活

    常用鏈接

    留言簿(16)

    隨筆分類

    隨筆檔案

    文章分類

    文章檔案

    收藏夾

    Java links

    搜索

    •  

    最新評論

    閱讀排行榜

    評論排行榜

    http://dev.mysql.com/doc/refman/5.5/en/connector-j-reference-implementation-notes.html @import url(http://m.tkk7.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);


    ResultSet

    By default, ResultSets are completely retrieved and stored in memory. In most cases this is the most efficient way to operate, and due to the design of the MySQL network protocol is easier to implement. If you are working with ResultSets that have a large number of rows or large values, and cannot allocate heap space in your JVM for the memory required, you can tell the driver to stream the results back one row at a time.

    To enable this functionality, create a Statement instance in the following manner:

    stmt = conn.createStatement(java.sql.ResultSet.TYPE_FORWARD_ONLY,
    java.sql.ResultSet.CONCUR_READ_ONLY);
    stmt.setFetchSize(Integer.MIN_VALUE);

    The combination of a forward-only, read-only result set, with a fetch size of Integer.MIN_VALUE serves as a signal to the driver to stream result sets row-by-row. After this, any result sets created with the statement will be retrieved row-by-row.

    There are some caveats with this approach. You must read all of the rows in the result set (or close it) before you can issue any other queries on the connection, or an exception will be thrown.

    The earliest the locks these statements hold can be released (whether they be MyISAM table-level locks or row-level locks in some other storage engine such as InnoDB) is when the statement completes.

    If the statement is within scope of a transaction, then locks are released when the transaction completes (which implies that the statement needs to complete first). As with most other databases, statements are not complete until all the results pending on the statement are read or the active result set for the statement is closed.

    Therefore, if using streaming results, process them as quickly as possible if you want to maintain concurrent access to the tables referenced by the statement producing the result set.

    posted on 2012-06-29 13:15 哈哈的日子 閱讀(475) 評論(0)  編輯  收藏

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 亚州免费一级毛片| 国产在线国偷精品免费看| 毛片基地免费视频a| 亚洲不卡视频在线观看| 亚州免费一级毛片| 国产精品高清视亚洲精品| 免费A级毛片无码免费视| 亚洲国产亚洲片在线观看播放 | 窝窝影视午夜看片免费| 国产hs免费高清在线观看| 国产亚洲人成网站在线观看| 精品国产呦系列在线观看免费| 国产91色综合久久免费分享| 亚洲一级毛片免费观看| 日韩特黄特色大片免费视频| 四虎成人精品国产永久免费无码| 亚洲另类激情综合偷自拍图| 久久久久久国产精品免费无码 | 免费中文字幕视频| 亚洲码国产精品高潮在线| 99热这里只有精品6免费| 亚洲人成电影网站久久| 免费人成在线观看网站品爱网日本| 日本特黄特色AAA大片免费| 亚洲va久久久噜噜噜久久天堂| 国产成人精品免费视频网页大全| 亚洲国产成人久久精品软件| 国产亚洲精品国看不卡| 中文字幕视频免费| 精品国产日韩亚洲一区91| 国产亚洲精品福利在线无卡一| 最近免费中文字幕高清大全| 精品无码专区亚洲| 亚洲小视频在线观看| 中文在线免费观看| 亚洲国产成人精品久久| 亚洲va中文字幕无码| 在线免费观看亚洲| 免费夜色污私人影院网站| 久久久无码精品亚洲日韩京东传媒| 日韩激情无码免费毛片|