OrientDB classes / clusters design -


i design following using classes , clusters looking logical , efficient solution.

i, have 3 types of users (very different) designed them classes extends user abstract class.

my app based on geoloc. in order give best user experience in matter of response time speed (when performing scans etc..) i'm hesitating between 2 methods :

  1. having each usertype many clusters number of countries, select targetting concerned cluster.

                               _______________________                           | user (abstract class) |                           |_______________________|                                       ^                                       |                                       |  ___________________         ___________________         ___________________ | usertype1 (class) |       | usertype2 (class) |       | usertype3 (class) | |___________________|       |___________________|       |___________________|           |                           |                           |           |                           |                           |     us-cluster_1                us-cluster_2                us-cluster_3     fr-cluster_1                fr-cluster_2                fr-cluster_3     uk-cluster_1                uk-cluster_2                uk-cluster_3 
  2. having countryfield each usertype select users filtering it.

                               _______________________                           | user (abstract class) |                           |_______________________|                                       ^                                       |                                       |  ___________________         ___________________         ___________________ | usertype1 (class) |       | usertype2 (class) |       | usertype3 (class) | |                   |       |                   |       |                   | | - countryfield    |       | - countryfield    |       | - countryfield    | |___________________|       |___________________|       |___________________| 

    and select * usertype1 countryfield = "us"

what efficient , logical way ?

thank you.

partly depends on record counts , desired response time. in our experience separating data clusters improves query times @ expense of more complexity (managing clusters, different queries, etc.). put couple million records in each cluster , add home-made indexes make query times quick.

you should generate test data , store both ways test query performance vs. requirements. no 2 use-cases ever same.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -