Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2005

    Unanswered: Fastest way to search and compare?

    Im working on a program for an online game and I have a few questions regarding database usage.

    The program is for comparing statistics of different items.
    Each character have four different slots to equip and what im trying to do is to compare each and every combination of those four item types. So if I want to know what combinations give lets say attack >30 I compare all items to each other and sort out the ones that together add upp to attack >30.

    The database will be distributed with the program so its all local, no server traffic to take into account.

    So far im just using a simple db I created in Access, but I get horrible speeds looping through all the different items.
    Each category has appx 90 items in it, 90*90*90*90=65610000 combinations and simply looping through is just way, way to slow.

    Any suggestions on how to solve this problem, perhaps a whole different type of database and approach?

    Im still pretty green as far as db with vb is concerned so please be gentle

  2. #2
    Join Date
    Nov 2004
    Cant you search in the Sql select statement itself?

  3. #3
    Join Date
    Jan 2004
    Aberdeen, Scotland
    something like this will give you all the combinations that can exist,
    Rename your fields appropriatly
    SELECT tblA.ID, tblB.ID, tblC.ID, tblD.ID
    FROM tblA, tblB, tblC, tblD
    WHERE (tblA.A, tblB.B, tblC.C, tblD.D) > 30;
    you can then search on this as it will provide all possible combinations over 30
    you can either right a query like this or fill an ADO recordset

Posting Permissions

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