Results 1 to 5 of 5

Thread: Problem regarding database in Qt

  1. #1
    Join Date
    Aug 2008
    Posts
    84
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Problem regarding database in Qt

    Hi , I am using QT4.4.0 and SQLITE as my database .I working with a project in which handles huge data continuously.It mean i need to insert 150*50 per second.For this I used transactions ,its good.But at the same time I need to retrieve the data from table at same rate to show them in form of plots.I am avle to do that ,but if I am using select statement to retrieve the data it slow downs the insertion. The speed of insertion was reducing when both insertion and retrieve process going simultaneously from same table campared with only insertion.I want the speed of insertion should not reduce even if the select statement executed simultaneously.
    So Please help me or suggest me to solve this problem.

    With Regards,
    Sudheer.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Problem regarding database in Qt

    Transactions slow down manipulations on the database and at the same time prevent other "threads" from seeing records inserted into the database before the transaction is commited. What exactly do you need transactions for?

    In addition if you store some data in the database and at the same time retrieve it back, maybe you can simply have some kind of cache in memory so that you can fill the cache before writing to the database and then read the data back immediately from cache instead of the database. It would be much faster this way.

  3. #3
    Join Date
    Aug 2008
    Posts
    84
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Problem regarding database in Qt

    Hi wysota,
    Thanks for your kind reply. You got my problem clearly and suggested me to use cache memory. Can I solve this problem with out using cache and using database.If so please suggest me.
    So please help me to solve this problem.

    With Regards,
    Sudheer.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Problem regarding database in Qt

    Operating on files is much slower than operating on RAM, so your choice is clear - either you have a fast and versatile solution or slow and clumsy. If you want to stick using the DB only - go ahead and buy yourself a much faster machine. And get rid of transactions, by the way.

  5. #5
    Join Date
    Aug 2008
    Posts
    84
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Problem regarding database in Qt

    Hi wysota,
    Thanks for your kind reply.

    With Regards,
    Sudheer.

Similar Threads

  1. Problem while inserting the data into database
    By sudheer168 in forum Qt Programming
    Replies: 2
    Last Post: 13th December 2008, 12:22
  2. Some Problem with Qt4 link to sql server 2000 Database
    By bangqianchen in forum Qt Programming
    Replies: 0
    Last Post: 29th August 2008, 11:43
  3. Multiple database connections
    By cyberboy in forum Qt Programming
    Replies: 3
    Last Post: 30th March 2008, 16:56
  4. problem in doing database program
    By wei243 in forum Qt Programming
    Replies: 0
    Last Post: 4th April 2007, 12:01
  5. Oracle Database Problem
    By magikalpnoi in forum Qt Programming
    Replies: 3
    Last Post: 27th September 2006, 21:19

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.