August 30, 2008, 19:00:32 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Revenue sharing launched. This is offered as a "thank you" for being a member of webmasterstalks.com community! If you have an Adsense/Yahoo publisher account then you can start right away !
 
  Home   Forum   Help Search Directory Calendar Login Register    RSS 2.0 feedAtom feed


News
Revenue sharing launched. This is offered as a "thank you" for being a member of webmasterstalks.com community! If you have an Adsense/Yahoo publisher account then you can start right away !
Pages: [1]
  Print  
Author Topic:

ERROR 1490 (HY000): A UNIQUE INDEX need to include all fields in the partition f

 (Read 1132 times)
0 Members and 1 Guest are viewing this topic.
bostam
Jr. Member
**

Points: 1
Offline Offline

Posts: 55


« on: September 19, 2006, 11:04:18 »

Is anyone using mysql 5.1 with partitions ? I get this error and I dont know what it is ...

ERROR 1490 (HY000): A UNIQUE INDEX need to include all fields in the partition function


Pls Help ... I'm desperate ...
Thanks for any help ...
Logged


TheGodFather
Administrator
Hero Member
*****

Points: 202
Offline Offline

Posts: 2570



WWW
« Reply #1 on: September 19, 2006, 12:29:29 »

Where are you using partitions ? ... what version of mysql do you use  (5.1.x ).

Probably you have 1 uniq keys + primary key (minimum) and probably you are doing a key partitions?

I'm right ?

Tell me more about your primary key and uniq key and I will help you ...

Regards
Logged

bostam
Jr. Member
**

Points: 1
Offline Offline

Posts: 55


« Reply #2 on: September 20, 2006, 01:59:33 »

Thanks for your answer ...

Yes I have A primary key on id and a unique key per address ...

How can I solve the error ?

My database contain a lot of data and is used on data mining on company where I work !

Logged
TheGodFather
Administrator
Hero Member
*****

Points: 202
Offline Offline

Posts: 2570



WWW
« Reply #3 on: September 20, 2006, 13:24:01 »

Hi,

For example if you have :

Primary Key (id),
Unique key (x) Parttitions by key (id) partitions x will not work

because you need to alter your table in this way:

Primary Key (id),
Unique key (x,id) Parttitions by key (id) partitions x

Read Mysql docs. You need to have all unque keys grupped.

Regards

Logged

bostam
Jr. Member
**

Points: 1
Offline Offline

Posts: 55


« Reply #4 on: September 21, 2006, 01:31:38 »

Thanks ... I didn't have time to read the docs ... but I will do my tests tomorow Smiley

Logged
TheGodFather
Administrator
Hero Member
*****

Points: 202
Offline Offline

Posts: 2570



WWW
« Reply #5 on: September 26, 2006, 16:20:01 »

Did you do more tests ?

Regards
Logged

bostam
Jr. Member
**

Points: 1
Offline Offline

Posts: 55


« Reply #6 on: September 27, 2006, 02:54:59 »

Yes ... And is working ... Thanks for help. Anyway I start with partitions by key and now I run partitions by range.

Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.4 | SMF © 2006, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks

TinyPortal v0.9.7 © Bloc
Valid XHTML 1.0! Valid CSS!