Results 1 to 1 of 1

Thread: Q Table View + Relational Model VERY SLOW

  1. #1
    Join Date
    Dec 2010
    Qt products

    Default Re: Q Table View + Relational Model VERY SLOW

    ok guys a BIG question...

    I ve loaded a mysql table using a relational table model in a qtableview...
    Table contains about 50 columns of which 18 are foreign keys to other tables.... and 150 records..
    i.e. i used the setRelation() method 18 times or so...

    the table loads and shows OK... but VERY VERY slow.... 1 minute...
    If I press a column to sort that takes another 1 minute to refresh or so...
    using QT with C++, running linux,on a dualcore 2.33 GHz pc..
    this does not add up...right? dont tell me there is not a bottleneck somewhere......

    is it the MySql server?
    IDEAS on how to speed things up??

    thanks !

    Added after 8 minutes:

    ok it appears that if I reduce the number of times i call model->setRelations() from 18 to 15 the performance goes sky high... from 1 minute down to 4 seconds.....!!!

    ok I know that there is a constraint in MySQL where you can have up to 15 (or 16) indexed columns in a single index in each table....

    anything above that and mysql will not accept it...

    any ideas on that?
    possibly a bug?
    Last edited by arimaniac; 8th December 2010 at 16:43.

Similar Threads

  1. Replies: 33
    Last Post: 7th December 2009, 10:11
  2. Table view->model->set data
    By tulsi in forum Qt Programming
    Replies: 3
    Last Post: 21st April 2009, 08:36
  3. [model/view] slow refresh on big table
    By lauranger in forum Qt Programming
    Replies: 4
    Last Post: 3rd March 2008, 21:40
  4. Relational table model Calulation
    By aekilic in forum Qt Programming
    Replies: 8
    Last Post: 7th February 2007, 23:40
  5. Relational Table Model Problem
    By aekilic in forum Qt Programming
    Replies: 2
    Last Post: 20th January 2007, 14:57

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
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.