Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h2>Generic</h2> <p>You say it is slow now and that can be many reasons for that other than the database like low memory, high CPU, disk fragmentation, network load, sockets problems etc etc. This should show up on a system monitor</p> <p>Try for instance Sysinternals (now MS) tool: <a href="http://live.sysinternals.com/procexp.exe" rel="nofollow noreferrer">http://live.sysinternals.com/procexp.exe</a></p> <p>But if that is all under control then back to the database.</p> <h2>Database index</h2> <p>One million records is not "that much" and should not be a problem. An index should do the trick if you don't have any indexes right now. You should probably set indexes on all tables if you haven't done so already.</p> <p>I tried to do a database model, is this right: <a href="http://www.freeimagehosting.net/image.php?a39cf99ae5.png" rel="nofollow noreferrer">http://www.freeimagehosting.net/image.php?a39cf99ae5.png</a></p> <h2>Table structure (?)</h2> <p>Page -> Field -> FieldControl -> ValueGroup -> Value</p> <p>The table structure looks like it may not be the optimal one but it is hard to say exactly when I don't know how the application works.</p> <blockquote> <p>Do all tables have the foreign keys of the table above ?</p> </blockquote> <h2>Is this somewhat similar to your code ?</h2> <p><strong>Pseudo code:</strong></p> <pre><code>1. Get page info. Gives key "page-id" 2. Get all "Field":s marked with that "page-id". Gives keys "field-id" &amp; "fieldcontrol-id" 3. Loop trough all fields-id:s and get the FieldControl for each one 4. Loop trough all fields-id:s and get all ValueGroup:s. Gives a list of "valuegroup-id":s keys 5. Loop trough all ValueGroup:s and get all fields </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload