On Fri, 20 Apr 2007, Ryan Novosielski wrote:

> This is really a MySQL specific question, but can you give me a hint on
> how those are created?

>> +-------+------------+---------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
>> | File  |          0 | PRIMARY             |            1 | FileId      |
>> A    |   133868525 |     NULL | NULL   |      | BTREE      |

ALTER TABLE File ADD INDEX FileId FileId

(first one created is the primary key)

>> | File  |          1 | JobId               |            1 | JobId       |
>> A    |          18 |     NULL | NULL   |      | BTREE      |         |
>> | File  |          1 | JobId               |            2 | PathId      |
>> A    |    33467131 |     NULL | NULL   |      | BTREE      |         |
>> | File  |          1 | JobId               |            3 | FilenameId  |
>> A    |   133868525 |     NULL | NULL   |      | BTREE      |         |

Alter table File add index JobId JobId,PathId,FilenameId

>> | File  |          1 | file_jobid_idx      |            1 | JobId       |
>> A    |          18 |     NULL | NULL   |      | BTREE      |         |

alter table File add index file_jobid_idx JobId

>> | File  |          1 | file_pathid_idx     |            1 | PathId      |
>> A    |     8924568 |     NULL | NULL   |      | BTREE      |         |

alter table File add index file_pathid_idx PathId

>> | File  |          1 | file_filenameid_idx |            1 | FilenameId  |
>> A    |    26773705 |     NULL | NULL   |      | BTREE      |         |

alter table File add index file_filename_idx FilenameId


It really is that simple, but it may tale a while to execute.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to