Jump to content

dantro

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Posts posted by dantro

  1. a good solution would be to have a log table for all

    video views. therefore you are free to analyze this

    data later on like views per hour etc.

     

    on a next step you build a cronjob which counts

    all video views and writes the sum into one table

    field (update col countviews in video table).

  2. hello

     

    i have a big problem dealing with shards.

    i would be pleased to get your ideas and practical

    solutions to my problem.

     

    imagine following scenario:

     

    i have 5 mysql shards, sharded by primary key.

     

    shard #1 (id 1-1,000,000)

    shard #2 (id 1,000,001-2,000,000)

    shard #3 (id 2,000,001-3,000,000)

    shard #4 (id 3,000,001-4,000,000)

    shard #5 (id 4,000,001-5,000,000)

     

    that way it is pretty easy to build a application to

    connect to the right shard if i have the id.

     

    now the problem:

    what do you do, if you consider to get your entries if

    you don't use primary key id. for example you want to

    get the entries by another key (date for example).

     

    do you have any ways to build appropriate keys to get

    your data on different ways out of shards ?

     

    please help me..

    i hope someone already did something like that.

     

    what do you do if you sharded your data on different

    physical machines and want to get the data our on

    different ways.

     

     

     

    thank you very much

    dan

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.