How to optimise query?

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default How to optimise query?

    Hi,

    I'm currently running a daily schedular that copies records from a Microsoft
    Access database and dumps them into a MySQL db. There are 2 options actually, 1
    where only the latest records from the Access db are appended to the MySQL db,
    and 2nd, where the users want to re-interface all the records.

    The problem is, there are more than 30,000 records in the Access db (and it's
    expanding day-by-day) and it's taking more than 3-5 mins to select all and dump
    it into the MySQL db and the users are complaining that this is much too slow.

    Is there a way to do this faster? Any way to optimise the query? Any tool that
    already exists for that?

    I would also like to show a progress bar while the program is executing. Could
    somebody please explain to me how to do this?

    Thanks and regards,
    Yogesh Mahadnac

    YogeshM Guest

  2. Similar Questions and Discussions

    1. Query of Queries on query New type query
      In CF5 we have a page that creates a query, using queryNew and querySetCell and the like, we then used dbtype="query" and gave it's name so we could...
    2. How to best optimise gradients with text?
      Whats would be the best solution to optimising an image where the backgrund is a gradient (best optimised as jpeg) and there is text on top, which...
    3. Optimise HD?
      > TidBITS#686/30-Jun-03 Hmmm, mebbe your Mac doesn't go any faster, but what about disk life? If the head's not thrashing back & forth between...
    4. Best practice to optimise big updates (repost, rewritten with example)
      George wrote: Right! and we're still discussing it over there.
    5. How to optimise many updates on 1Mio rows?
      I need to perform many update queries on the same table sporting 1 Mio rows. It is not possible to do all updates in one query, I definitely need...
  3. #2

    Default Re: How to optimise query?

    YogeshM wrote:
    > Hi,
    >
    > I'm currently running a daily schedular that copies records from a
    > Microsoft Access database and dumps them into a MySQL db. There are 2
    > options actually, 1 where only the latest records from the Access db
    > are appended to the MySQL db, and 2nd, where the users want to
    > re-interface all the records.
    >
    > The problem is, there are more than 30,000 records in the Access db
    > (and it's expanding day-by-day) and it's taking more than 3-5 mins to
    > select all and dump it into the MySQL db and the users are
    > complaining that this is much too slow.
    >
    > Is there a way to do this faster? Any way to optimise the query? Any
    > tool that already exists for that?
    A few tips:
    - if you have a lot of indexes on the MySQL table disable them before
    inserting the rows and enable them after;
    - try using MySQL's extension to INSERT:
    INSERT INTO table(title)
    VALUES ('t1'), ('t2'), ....;
    > I would also like to show a progress bar while the program is
    > executing. Could somebody please explain to me how to do this?
    A very crude sample:

    <div style="width:400px;"><div id="progress" style="width:0px;"></div></div>

    and cfflush these js bits every 100 records or so:
    <script>
    document.getElementById("progress").style.width = (#CurrentRow#*400) /
    #RecordCount# + "px";
    </style


    --
    <mack />


    Neculai Macarie Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139