Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > Database
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

Database Database problems or need to ask a question? maybe something to do with sql injections or a database software question. Database topics cover MySQL, PostgreSQL, Oracle, SQL Server or anything else related to databases.

Google
Closed Thread
 
LinkBack Thread Tools Display Modes
Old 07-01-2007, 9:35 PM   #1
JoeT
 
JoeT's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default How do you partition tables in mysql 5?

Hi...

According to the MySQL 5.0 documentation, for setting up advanced
innodb, the following is stated:

An advanced my.cnf example. Suppose that you have a Linux computer with
2GB RAM and three 60GB hard disks at directory paths /, /dr2 and /dr3.
The following example shows possible configuration parameters in my.cnf
for InnoDB.

[mysqld]
# You can write your other MySQL server options here
# ...
innodb_data_home_dir =
#
# Data files must be able to hold your data and indexes
innodb_data_file_path =
/ibdata/ibdata1:2000M;/dr2/ibdata/ibdata2:2000M:autoextend

OK....let's assume that I have 2-tables, X and Y, and I want to create
them, BUT have X point to the ibdata1 path and Y to ibdata2. According
to the CREATE TABLE doc, the DATA DIRECTORY option only works for
MyISAM.

Anybody know how to do this using innodb?

Thanks,
Joe

 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Advertisements
Old 07-01-2007, 9:35 PM   #2
Axel Schwenke
 
Axel Schwenke's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default How do you partition tables in mysql 5?

"JoeT" <trubisz@yahoo.com> wrote:

> ... let's assume that I have 2-tables, X and Y, and I want to create
> them, BUT have X point to the ibdata1 path and Y to ibdata2. According
> to the CREATE TABLE doc, the DATA DIRECTORY option only works for
> MyISAM.
>
> Anybody know how to do this using innodb?


You cannot do that. InnoDB decides how it distributes data over
tablespaces. OTOH you can use --innodb-file-per-table to have
InnoDB create a separate tablespace for each table. IMHO there
is no particularly good reason for doing that anyway. YMMV.


XL
--
Axel Schwenke, Senior Software Developer, MySQL AB

Online User Manual: http://dev.mysql.com/doc/refman/5.0/en/
MySQL User Forums: http://forums.mysql.com/
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 9:35 PM   #3
Bill Karwin
 
Bill Karwin's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default How do you partition tables in mysql 5?

Axel Schwenke wrote:
> you can use --innodb-file-per-table to have
> InnoDB create a separate tablespace for each table. IMHO there
> is no particularly good reason for doing that anyway. YMMV.


IMHO the best reason for using innodb-file-per-table is that when you
drop a table, the filesystem space is released.

If you put all your InnoDB tables in one filespace file, the only way to
get the file to shrink is to dump all your other InnoDB tables, remove
the filespace file, and re-import the tables.

Regards,
Bill K.
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 9:35 PM   #4
JoeT
 
JoeT's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default How do you partition tables in mysql 5?

Actually, having done really huge systems (we are talking about very
high speed/high volume OLTP systems), I can utilize the advantages of
the hardware as well. So, it becomes a major performance advantage.

Joe

 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 9:35 PM   #5
Axel Schwenke
 
Axel Schwenke's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default How do you partition tables in mysql 5?

"JoeT" <trubisz@yahoo.com> wrote:

> Actually, having done really huge systems (we are talking about very
> high speed/high volume OLTP systems), I can utilize the advantages of
> the hardware as well. So, it becomes a major performance advantage.


Ahh. I guessed that already.

My experience as well as the experience of MySQL customers shows,
that multiple disks are best used as RAID. The most appropriate
RAID level is RAID-10 (a stripe of mirrors). If you need the last
performance kick, you might go for RAID-0. However you should
avoid RAID-5 because it has very bad write performance.

Compared to hand-tuned distribution of data on multiple disks,
RAID has many advantages

- it's simple
- it's self-adjusting - no need to change the disk layout
if your data distribution or access pattern changes
- it's easily extensible

There is a nice bluprint from SUN concerning that issue:
<http://www.sun.com/blueprints/1000/layout.pdf>

I know the old Oracle rule-of-thumb "separate data and indizes, put
in different tablespaces, put each tablespace onto it's own disk" -
but IMNSHO this rule is pretty outdated in the time of massively
parallelized storage systems.


XL
--
Axel Schwenke, Senior Software Developer, MySQL AB

Online User Manual: http://dev.mysql.com/doc/refman/5.0/en/
MySQL User Forums: http://forums.mysql.com/
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Featured Websites
Free Space
Free Space
Free Space Free Space
Closed Thread
Tags: , ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL backup but only soem tables with a prefix Josselin Database 2 07-01-2007 7:27 PM
LARGE tables in mysql-standard-5.0.18-linux-i686? Ignoramus1130 Database 3 07-01-2007 7:01 PM
Is it possible to restore MYSQL tables with only FRM files Rock2005 Database 0 05-31-2007 8:42 PM
docs about access tables, operation tables, volume tables BradPitt Database 0 05-31-2007 8:42 PM
Export MS Access tables with random autonumber fields to MySQL GGL Database 0 05-31-2007 8:39 PM


Featured Websites




All times are GMT +1. The time now is 12:15 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

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