Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How long does the write operation of the database take
Forum Updated to NodeBB v4.3 + New Features

How long does the write operation of the database take

Scheduled Pinned Locked Moved Solved General and Desktop
22 Posts 5 Posters 3.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • JonBJ JonB

    @tovax
    Well I'm not sure what you want us to say here? At your timings you can achieve ~15 write operations per second. I would not be very happy with this!

    Try:

            timer.start();
            for (int = 0; i < 10; i++)
            {
                model->setData(index, value, role);
                // change `index` and/or `value`
            }
            int64_t elapsedBuffer = timer.elapsed();
    

    Does this take 10x as long??

    I have checked the signals and slots of the database and there is no connection during the reading and writing test.

    So you have no views at all attached to the model?

    tovaxT Offline
    tovaxT Offline
    tovax
    wrote on last edited by tovax
    #21

    @JonB Hi, thank you very much for your patience.

    1. It takes 10x time.
    2. no views attached to the model.
    3. My purpose is to know how many milliseconds it takes for the database to read and write normally, ~ 80ms seems to be too long, I doubt my program.
    4. I created a demo program separately, and the reading and writing speed is very fast. I will reply to the final test results later.
    1 Reply Last reply
    0
    • tovaxT Offline
      tovaxT Offline
      tovax
      wrote on last edited by
      #22

      @Christian-Ehrlicher @JonB @J-Hilk @jsulm
      Thank you for your help. The reason for the slow speed should be the hard disk. The same demo takes about 80 ms for HDD and about 4 ms for SSD.

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved