CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Aug 2011
    Posts
    2

    difference of performance when retrieving different column from resultset

    Hi,
    i am experiencing a very strange issue when i try to load different column from a result set.

    I have a table t :

    desc table t;
    +-----------------------+-------------------------------------+------+-----+---------------------+-------+
    | Field | Type | Null | Key | Default | Extra |
    +-----------------------+-------------------------------------+------+-----+---------------------+-------+
    | sub_id | varchar(20) | NO | PRI | NULL | |
    | net_id | int(10) unsigned | YES | | NULL | |
    | ipv4 | varchar(20) | YES | MUL | NULL | |
    | ipv6 | varchar(40) | YES | | NULL | |
    | doc_version | tinyint(4) | YES | | NULL | |
    | tier | varchar(30) | YES | | NULL | |
    | last_updated_time | timestamp | NO | | 0000-00-00 00:00:00 | |
    | last_completed_period | int(10) unsigned | YES | | 0 | |
    | state | enum('active','inactive','deleted') | YES | | active | |
    +-----------------------+-------------------------------------+------+-----+---------------------+-------+


    when i try to retrieve data (sub_id + something else except tier column) from a large resultset i got a very good time:
    Load ResultSet took 8 seconds for 892098 rows

    But when i try to retrieve data from the tier column ( + sub_id) it could take up to 30 minutes.

    Load ResultSet took 1925 seconds for 892098 rows

    Both for sub_id and tier I used the method ResultSet.getString(columnName)

    Has anyone faced this issue before? Please help me out. Thanks

  2. #2
    Join Date
    Aug 2011
    Posts
    2

    Re: difference of performance when retrieving different column from resultset

    I didn't found the problem but i found a workaround of my issue
    Instead of using ResultSet.getString(columnName) method i used ResultSet.getCharacterStream(columnName)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured