I need your suggestion

Discussion in 'MySQL' started by deriklogov, Nov 7, 2009.

  1. #1
    Hey,

    I need your suggestion, what I try to do is to divide big table into couple small ones , so it could work faster, it is working faster but I found an issue and cant decide what to do.

    What I am thinking is that - should be divide table into 10 pieces or 100 pieces, 100 pieces will work very very fast but I dont know how to run full text search thru all those tables, like its more faster to run 1 search thru 10 tables than thru 100 tables or should I join tables and how fast is that.

    Need your suggestions, thank you very much
     
    deriklogov, Nov 7, 2009 IP
  2. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #2
    How did you divide your tables into smaller ones?
     
    mwasif, Nov 8, 2009 IP
  3. n3r0x

    n3r0x Well-Known Member

    Messages:
    257
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    120
    #3
    UNION should help you run the same search in multiple tables..
    How fast it is is a matter of indexing, structure of the tables and so on.
    Give us more information on what you want to do and we´ll be able to answer more specific.
     
    n3r0x, Nov 8, 2009 IP
  4. deriklogov

    deriklogov Well-Known Member

    Messages:
    1,079
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    130
    #4
    well I got a full table with about 4 million ads and its about 3gig in size, my issue is extracting specific ads for specific categories even with indexing getting very slow, so what I did is divided that table by categories into small ones, but when I need to run search thru the tables (if not specific category chosen) I still have to join them together
     
    deriklogov, Nov 8, 2009 IP
  5. mastermunj

    mastermunj Well-Known Member

    Messages:
    687
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    110
    #5
    mastermunj, Nov 8, 2009 IP
  6. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #6
    You cannot search the MERGE table with FULLTEXT search (its a MERGE limitation).

    With the current design you should go as n3r0x suggested.

    I recommend you to useSphinx if you have that much amount of data and your host support it. If you have a dedicated server, then you can set it up easily. It is realy fast in FULLTEXT searching as compared to MySQL.
     
    mwasif, Nov 8, 2009 IP
  7. deriklogov

    deriklogov Well-Known Member

    Messages:
    1,079
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    130
    #7
    to mastermunj:

    Hey , thanks for reply
    so you mean join all tables together on merge table after ?
     
    deriklogov, Nov 8, 2009 IP
  8. mastermunj

    mastermunj Well-Known Member

    Messages:
    687
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    110
    #8
    I agree with mwasif. I missed on checking that MERGE does not support full text indexing.

    If you have dedicated server, Sphinx is worth exploring.. I am also trying to learn it..
     
    mastermunj, Nov 8, 2009 IP
  9. deriklogov

    deriklogov Well-Known Member

    Messages:
    1,079
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    130
    #9
    what is "merge" engine for ?
     
    deriklogov, Nov 8, 2009 IP
  10. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #10
    It will be a good option get better speed for your case if you didn't need FULLTEXT. For complete details checkout MySQL manual.
     
    mwasif, Nov 8, 2009 IP