Results 1 to 5 of 5

Thread: performance of Using QSqlQuery to access table containing blob coloumn

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: performance of Using QSqlQuery to access table containing blob coloumn

    Why? What can i do to make the former as fast as the latter?
    Because the BLOB is probably big and it requires a huge amount of processing power to query all these rows from database into memory. If you don't select it in your query, then database driver will not load BLOBs into memory, which allows it to complete faster.
    If you need to do some kind of processing on these rows then display a progress dialog or something. What is your task anyway ? I doubt you will increment an integer in your final code, if you give us more details then maybe we can help to optimize your code.

  2. #2
    Join Date
    Jan 2014
    Posts
    20
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: performance of Using QSqlQuery to access table containing blob coloumn

    Quote Originally Posted by stampede View Post
    Because the BLOB is probably big and it requires a huge amount of processing power to query all these rows from database into memory. If you don't select it in your query, then database driver will not load BLOBs into memory, which allows it to complete faster.
    If you need to do some kind of processing on these rows then display a progress dialog or something. What is your task anyway ? I doubt you will increment an integer in your final code, if you give us more details then maybe we can help to optimize your code.
    Thank you first!
    I just want to select all the rows as fast as possible ,how to make it with QSqlTableModel?

Similar Threads

  1. QSqlQuery Insert BLOB, But Not all the BLOB Is Inserted?
    By zerokewl in forum Qt Programming
    Replies: 0
    Last Post: 10th September 2013, 07:06
  2. QsqlQuery to access all the value
    By robotics in forum Qt Programming
    Replies: 4
    Last Post: 6th July 2011, 10:19
  3. QSqlQuery::prepare() - placeholder as table name
    By dawwin in forum Qt Programming
    Replies: 2
    Last Post: 7th March 2011, 21:40
  4. How to delete results of QSqlQuery from table ?
    By homerun4711 in forum Newbie
    Replies: 2
    Last Post: 14th February 2011, 22:50
  5. QSqlQuery and bad performance!
    By mismael85 in forum Qt Programming
    Replies: 9
    Last Post: 24th September 2010, 23:39

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.