Professional Web Applications Themes

how to copy indexes to a new database - MySQL

HI all, I want to generate a script of indexes in an mysql DB and copy it over to some instance on a diffrenet server. I dont want to dump data only indexes. Please help!! and thanks in advance.!! PS...

  1. #1

    Default how to copy indexes to a new database

    HI all,

    I want to generate a script of indexes in an mysql DB and copy it over
    to some instance on a diffrenet server.
    I dont want to dump data only indexes.


    Please help!!
    and thanks in advance.!!


    PS

    psawant@gmail.com Guest

  2. #2

    Default Re: how to copy indexes to a new database

    com wrote: 

    You could copy the files - but how would that help you? Unless the data
    files are identical, the index will not match the table.

    --
    ==================
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    net
    ==================
    Jerry Guest

  3. #3

    Default Re: how to copy indexes to a new database

    com wrote:
     


    Indexes are only pointers to data. In most db engines, the index is a logical
    pointer to the offset into the data file where the data is stored using either a
    B-Tree, HASHED or bitmap. Bitmap and Hashed are best suited when 99% of the
    queries are for equality (where a = 'XYZ'). B-Tree indexes are best suited for
    range retrievals (where a > 'XYZ' and a < 'ZZZ').

    Which is why they have a "create index" syntax and tables can have more than one
    index. I know of some database tables I have worked on where the storage space
    for the table indexes exceeded the table data area by 2X-3X. (Indexes used to
    make certain queries "go faster".

    So, The real question is: what problem are you trying to solve, because it is
    evident that you are still in the learning process as to how database engines
    actually function. Unless you are looking to "clone" the database daily or use
    some automated tion method, the question you are asking does not even
    make sense.

    --
    Michael Austin.
    Database Consultant/Systems yst
    Michael Guest

Similar Threads

  1. Replies: 6
    Last Post: September 3rd, 03:47 PM
  2. Copy database from MySQL to MSAccess
    By Kjell Hansen in forum PHP Development
    Replies: 3
    Last Post: September 2nd, 10:01 AM
  3. Copy file to database
    By Martin de vroom in forum Microsoft SQL / MS SQL Server
    Replies: 2
    Last Post: June 30th, 04:30 PM
  4. How to copy records from one database to another one ?
    By Jesus Gonzalez in forum FileMaker
    Replies: 3
    Last Post: June 28th, 03:03 PM
  5. Copy Database from NT to W2K
    By Giuseppe in forum Oracle Server
    Replies: 3
    Last Post: December 26th, 11:39 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139