Re: Partition Help

2006-10-08 Thread Jon Stephens



Date: Mon, 02 Oct 2006 13:22:37 -0400
To: mysql@lists.mysql.com
From: Michael Gargiullo <[EMAIL PROTECTED]>
Subject: RE: Partition Help
Message-id: <[EMAIL PROTECTED]>





Daily partitions are created then sub partitioned across 6 data disks
and 6 index disks.

We attempted to build a new table per hour, and merge them after 3
hours. We killed the processes after 2 hours. 1 hour of data is approx
18GB. The server only has 12GB of RAM.

I wish we could partition down to TO_HOUR instead of TO_DAY


There's some discussion of this issue on the Partitioning Forum - 
http://forums.mysql.com/list.php?106 - and you're more likely to get 
topic-specific attention there from users and MySQL developers working 
with partitioning than you are here on the General list.


Also, have you checked out the recent articles on partitioning available 
from our DevZone? These include:


http://dev.mysql.com/tech-resources/articles/mysql_5.1_partitioning_with_dates.html

http://dev.mysql.com/tech-resources/articles/mysql_5.1_partitions.html

- both of which discuss date-based partitioning techniques that you 
might find useful.


cheers

jon.


--

Jon Stephens - [EMAIL PROTECTED]
Technical Writer - MySQL Documentation Team
___ Brisbane, Australia (GMT +10.00)
_x_ Bangkok, Thailand (GMT +07.00)
___ Office: +61 (7) 3209 1394
_x_ Office: +66 0 2740 3691 5 ext. #201
Mobile: +61 402 635 784
MySQL AB: www.mysql.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



MSSQL(B-end) to MYSQL(Front-End) -> InnoDB or MyISAM

2006-10-08 Thread Ow Mun Heng
I'm just curious as to which would have better performance for my needs.

backend is a MSSQL server and I want to replicate it into a MySQL
Frontend for user accesses.

replication would be done via "mysqlimport/load data infile". I'm
thinking of doing the inserts something like ever 5 seconds or so.

MyISAM tables are faster than InnoDB, but they are more optimised for
READS than WRITEs, however due to the replication, (being done every 5
secs on ~5 tables), I'm wondering if this will cause performance losses
due to table-locks etc.

Thanks

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Moving Database from PC to Apple

2006-10-08 Thread Chris Sansom

At 15:01 -0700 7/10/06, David Blomstrom wrote:

Thanks. Is this something I can do through phpMyAdmin?


Yes! Easy:

First, create the database - just the database, no tables or anything 
- on the Mac.


Next, go to the database on the PC in phpMyAdmin and without 
selecting a table in the sidebar, click the Export tab. In the 
'export as' part of the page (which varies wildly between phpMyAdmin 
versions), SQL is probably selected as the default. If so, leave it; 
if not, select it. Also make sure both Structure and Data are 
selected in the 'what to export' part. Then click the Go button.


This will display all your database as SQL commands in text format. 
Select All, copy it into a text file and save it. Warning: in some 
older versions of phpMyAdmin, you'll get a line saying something like 
'Database xxx running on yyy' at the top, as an html , above the 
comment lines starting with #. This line will be included in the 
'select all', so you'll have to delete it before you import... which 
comes next:


Having transferred the text file to your Mac, go into phpMyAdmin, to 
the new database you have created, and click SQL among the tabs along 
the top. If there's anything in the  that appears, delete 
it, then copy and paste the entire contents of the text file into 
there (tip: if you get hold of the OmniWeb browser for Mac OS X, you 
can open a  into a nice big editing window, which will make 
it easier to see what you're doing). Click Go and, to quote the 
immortal Mr Jobs, 'Boom! You're done.'


--
Cheers... Chris
Highway 57 Web Development -- http://highway57.co.uk/

Outside of the killings, Washington has one of the
lowest crime rates in the country.
   -- Mayor Marion Barry, Washington, DC

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Too many open processes??

2006-10-08 Thread Chris Sansom

At 17:37 -0700 7/10/06, Cabbar Duzayak wrote:

I am using mysql_pconnect from PHP to connect to our mysql server.


...


Is there a way to configure mysql so that it will kill a process after
a certain period of idle time, just like Apache does?


I may be barking up the wrong tree here, but as I understand it 
(which is hazily :-) ), mysql_pconnect creates a persistent 
connection, which may not be what you want. Try plain mysql_connect 
instead and see what happens. It's what I always use and it's never 
caused any problems, but then I only deal with small databases 
(certainly compared with some on this list!)...


--
Cheers... Chris
Highway 57 Web Development -- http://highway57.co.uk/

It isn't necessary to imagine the world ending in fire or ice -
there are two other possibilities: one is paperwork,
and the other is nostalgia.
   -- Frank Zappa

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Difference between Pro and commuity edition

2006-10-08 Thread Andrew Black - lists
I am trying to find out the difference between the Pro and community 
editions of MySQL.  If I want to support GPL applications I can install 
the community ed.  If later  want to support a non GPL application do I 
need to install anything different.


I have found lots of web pages but they don't quite answer this question 
(apologies if I have mussed something obvious).


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Анализ релевантной информации

2006-10-08 Thread Vitaliy Okulov
Здравствуйте, Экономиcт.

Вы писали 8 октября 2006 г., 5:37:00:

>>  АНАЛИЗ ВЗАИМОСВЯЗИ РАСХОДОВ, ОБЪЕМА ДЕЯТЕЛЬНОСТИ И ПРИБЫЛИ (CVP-АНАЛИЗ).
>>  АНАЛИЗ РЕЛЕВАНТНОЙ ИНФОРМАЦИИ ДЛЯ ПРИНЯТИЯ УПРАВЛЕНЧЕСКИХ РЕШЕНИЙ.
>>  ЦЕЛЕВОЕ ПЛАНИРОВАНИЕ ПРИБЫЛИ.

>>  Тренинг • 13 октября • 2006 г.
>>  г. Kиeв • ул. Михайловская 1/3 • отeль «Казацкий»
>>  Тeл.: (044) 331-6414

> ЦЕЛЕВАЯ АУДИТОРИЯ

> Представители экономических служб предприятий, финансисты и руководители
> промышленных предприятий, бухгалтера.

> ПPОГРАММА СEМИНАРА

>1. Анализ соотношения Затраты-Объем-Прибыль (CVP):
>   * Точка безубыточности.
>   * Коэффициент маржинального дохода. 
>2. Цель и методы CVP анализа.
>3. Анализ чувствительности прибыли к изменениям затрат, цены и объема 
> продаж:
>   * Запас прочности.
>   * Коэффициент запаса прочности.
>   * Структура затрат.
>   * Операционный рычаг.
>   * Дифференциальный анализ.
>   * Маржинальный анализ. 
>4. Анализ взаимосвязи затрат, объема деятельности и прибыли при 
> ассортименте:
>   * Комбинация продаж.
>   * Средневзвешенный маржинальный доход.
>   * Точка безубыточности при ассортименте. 
>5. Процесс принятия решения и релевантность учетной информации:
>   * Pеальные расходы.
>   * Aльтернативные расходы.
>   * Pелевантная оценка материалов для выполнения заказа.
>   * Pелевантные расходы на оплату труда. 
>6. Анализ вариантов альтернативных решений.
>7. Решение «о специальном заказе».
>8. Решение «расширение или сокращение сегмента деятельности».
>9. Решение «производить или покупать».
>   10. Решение «продавать или обрабатывать дальше».
>   11. Оптимальное использование ограниченных ресурсов.
>   12. Решение задач на закрепление материала 
>   13. Ответы на вопросы.

> BЕДУТ CEМИНАР

> Член Федерации профессиональных бухгалтеров и аудиторов Украины (ФПБАУ).
> Член комитета по образованию ФПБАУ. Сертификат международного 
> бухгалтера-практика(САР), бизнес-тренер, финансовый директор.

> CТOИМОСТЬ

> * 560.00 гpн. — зa однoго учаcтникa, (бeз НДC, eдиный налoг), 
>   при оплате за двух участников — 1050.00 грн.

> PEГЛАМЕНТ

> * 10.00-17.00
> * Пepеpыв 13.00-14.00
> * Peгиcтрaция c 9.30 в конфepeнц-зале гocтиницы «Казацкая». 

> PEГИCТPАЦИЯ

> * Тeл.: (044) 331-6414
> * Kaждый учacтник ceминарa пoлучaeт буxгaлтepский кoмплeкт — 
>   opигинaлы дoкумeнтoв: дoгoвоp, aкт, opигинaл cчeтa, 
>   кoпии cвидeтeльcтв. 




LOL Russian SPAM.

-- 
С уважением,
 Vitaliy  mailto:[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Returning a Value from a Stored Procedure

2006-10-08 Thread Greg Lindstrom

Hello-
I am running MySQL 5.0 on Windows XP hitting it from Python (2.4) routines.
I have an id column (auto increment, primary key) on every table that I use
to join other tables.  I use stored procedures to insert new records into
each table and would like to know how to return the id value of the recently
inserted record (it's more a problem on how to *get* the id value to return
than how to return it).

If anyone can show me how to do this or point me to the appropriate
documentation, I would be grateful.

--greg


Re: Returning a Value from a Stored Procedure

2006-10-08 Thread Gabriel PREDA

Let's suppose you have a table `t` with these columns:
id -> auto increment, primary key, not null
a
b
c

N

If you do any of these:
INSERT INTO `t` (a, b, c ..., K) VALUES(va, vab, vc, ... vK);
INSERT INTO `t` (id, a, b, c ..., K) VALUES(0, va, vab, vc, ... vK);
INSERT INTO `t` (id, a, b, c ..., K) VALUES(NULL, va, vab, vc, ... vK);

In the above cases MySQL "generates" the ID for you... and you may
retrieve it immediately after the query that generates it with:
SELECT @LastGeneratedId := LAST_INSERT_ID();

Or you can use it in a 2 contigous INSERTS:
INSERT INTO `t` (id, a, b, c ..., K) VALUES(NULL, va, vab, vc, ... vK);
INSERT INTO `t2` VALUES(LAST_INSERT_ID(), f, g, h);


Have fun !

But not that LAST_INSERT_ID will not be updated if you insert an
explicit value (except: 0)
INSERT INTO `t` (id, a, b, c ..., K) VALUES(145899, va, vab, vc, ...
vK); < this will not affect LAST_INSERT_ID() value.

And another thing... LAST_INSERT_ID() is kept on a per connection
basis... so it will not mix with other users LAST_INSERT_IDs

-- -- -- -- -- -- -- -- -- -- -- -- -- --
Gabriel PREDA
Senior Web Developer

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Moving Database from PC to Apple

2006-10-08 Thread David Blomstrom
OK, now I get it. I'll give that a try. Thanks for the tip about the OmniWeb 
browser, too.

- Original Message 
From: Chris Sansom <[EMAIL PROTECTED]>
To: David Blomstrom <[EMAIL PROTECTED]>; mysql@lists.mysql.com
Sent: Sunday, October 8, 2006 1:51:33 AM
Subject: Re: Moving Database from PC to Apple

At 15:01 -0700 7/10/06, David Blomstrom wrote:
>Thanks. Is this something I can do through phpMyAdmin?

Yes! Easy:

First, create the database - just the database, no tables or anything 
- on the Mac.

Next, go to the database on the PC in phpMyAdmin and without 
selecting a table in the sidebar, click the Export tab. In the 
'export as' part of the page (which varies wildly between phpMyAdmin 
versions), SQL is probably selected as the default. If so, leave it; 
if not, select it. Also make sure both Structure and Data are 
selected in the 'what to export' part. Then click the Go button.

This will display all your database as SQL commands in text format. 
Select All, copy it into a text file and save it. Warning: in some 
older versions of phpMyAdmin, you'll get a line saying something like 
'Database xxx running on yyy' at the top, as an html , above the 
comment lines starting with #. This line will be included in the 
'select all', so you'll have to delete it before you import... which 
comes next:

Having transferred the text file to your Mac, go into phpMyAdmin, to 
the new database you have created, and click SQL among the tabs along 
the top. If there's anything in the  that appears, delete 
it, then copy and paste the entire contents of the text file into 
there (tip: if you get hold of the OmniWeb browser for Mac OS X, you 
can open a  into a nice big editing window, which will make 
it easier to see what you're doing). Click Go and, to quote the 
immortal Mr Jobs, 'Boom! You're done.'

-- 
Cheers... Chris
Highway 57 Web Development -- http://highway57.co.uk/

Outside of the killings, Washington has one of the
lowest crime rates in the country.
-- Mayor Marion Barry, Washington, DC








SQL Query help

2006-10-08 Thread C K

Friends,
I am developing a database for accounting software. I have one problem
regarding calculation of balances on daily basis for all ledgers. I am using
Access 2003 as frontend. While designing I found that maintaining of daily
balances is impossible to client's requirements. But as the solution I to
execute two SQL queries for 365 times to calculate Opening and closing
balances. what i need is a hint/example to write a function/SQL statement to
run these queries in single/minimum iterations.
table format:

LedgerID | Opening Credit | Opening Debit | Current Credit | Current Debit |
Closing Credit | Closing Debit | Date

Previous dates closing balance should be the opening for next date.

Please suggest the answer.
Thanks,
CPK


A join I can not figure out

2006-10-08 Thread Critters
Hi, I am certain this is possible with a single query, but I have had 
not joy looking on google or using trial and error in MySQL...


Table1: id, name
Table2: id,member1,member2

In "Table2" the member1 and member2 are the ID's from "Table1"

Table1:
1, Dave
2, Bob
3, Simon

Table2:
1,1,2
2,2,3
3,1,3

Result wanted:
1,Dave,Bob
2,Bob,Simon
3,Dave,Simon

There are a whole bunch of fields I would want to pull from table1, but 
for this example I have just used name. Can anyone point me in the right 
direction?

--
Dave

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: A join I can not figure out

2006-10-08 Thread Jan Pieter Kunst

On 10/8/06, Critters <[EMAIL PROTECTED]> wrote:

Hi, I am certain this is possible with a single query, but I have had
not joy looking on google or using trial and error in MySQL...

Table1: id, name
Table2: id,member1,member2

In "Table2" the member1 and member2 are the ID's from "Table1"

Table1:
1, Dave
2, Bob
3, Simon

Table2:
1,1,2
2,2,3
3,1,3

Result wanted:
1,Dave,Bob
2,Bob,Simon
3,Dave,Simon

There are a whole bunch of fields I would want to pull from table1, but
for this example I have just used name. Can anyone point me in the right
direction?


This works:

mysql> select t2.id, t1a.name, t1b.name from table2 as t2 join table1
as t1a on (t1a.id=t2.member1) join table1 as t1b on
(t1b.id=t2.member2);

++--+---+
| id | name | name  |
++--+---+
|  1 | dave | bob   |
|  3 | dave | simon |
|  2 | bob  | simon |
++--+---+
3 rows in set (0.00 sec)

JP

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Slow Access When Inserting Records

2006-10-08 Thread Neil Tompkins
Hi,
 
We have a mySQL database running version 3.23.58 on a linux machine.  
 
This database is accessed from both a Windows IIS web server and a linuz zeus 
web server. On the linux server I'm not sure of what driver etc is installed, 
however the access time to save a record is far quicker than the windows 
server. On the windows server ODBC driver 3.51 is installed.
 
We don't appear to have the problem when reading data from the server (SELECT 
FROM etc).
 
All servers are on the same network.  
 
All data is accessed using ASP (active server pages, vb script).
 
Any ideas what the problem might be ?
Thanks,
Neil
 
_
Be one of the first to try Windows Live Mail.
http://ideas.live.com/programpage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d

How to not repeat fields

2006-10-08 Thread Deckard
Hi,

How do i dreate a table, let's say:

CREATE TABLE wl_articles(wl_articles_id INT NOT NULL AUTO_INCREMENT
PRIMARY KEY, title TEXT NOT NULL,
 main TEXT NOT NULL, extended TEXT NOT NULL, permalink
VARCHAR(255) NOT NULL, date DATE NOT NULL, ip VARCHAR(15), user_agent
VARCHAR(50), status INTEGER NOT NULL,
 password VARCHAR(32) NOT NULL) TYPE=MyISAM;

without allowing INSERTs to repeat rows based on certain fields, for
example, "main" and "status" ?

Any help would be appreciated.

Warm Regards,
Deckard

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: How to not repeat fields

2006-10-08 Thread Paul DuBois

At 22:11 +0100 10/8/06, Deckard wrote:

Hi,

How do i dreate a table, let's say:

CREATE TABLE wl_articles(wl_articles_id INT NOT NULL AUTO_INCREMENT
PRIMARY KEY, title TEXT NOT NULL,
 main TEXT NOT NULL, extended TEXT NOT NULL, permalink
VARCHAR(255) NOT NULL, date DATE NOT NULL, ip VARCHAR(15), user_agent
VARCHAR(50), status INTEGER NOT NULL,
 password VARCHAR(32) NOT NULL) TYPE=MyISAM;

without allowing INSERTs to repeat rows based on certain fields, for
example, "main" and "status" ?


Normally, you would do this by creating a UNIQUE index on the combination
of columns.  (Or you could use a PRIMARY KEY if both columns are NOT NULL.)

However, you cannot do what you want in this case.  Why?  Because main is
a TEXT column, and TEXT columns allow a maximum of 255 initial characters
to be indexed.  That means you cannot use a UNIQUE index to provide a
uniqueness constraint on anything from the 256th character on.

--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: How to not repeat fields

2006-10-08 Thread Deckard
Hi,

Ok, naow i have this:

CREATE TABLE wl_users(wl_user_id INT NOT NULL AUTO_INCREMENT, name
VARCHAR(255) NOT NULL, email VARCHAR(50) NOT NULL, password VARCHAR(32)
NOT NULL, PRIMARY KEY (wl_user_id, name, email, password)) TYPE=MyISAM;

and it lets repeated rows.

How can i avoid the repeates rows ?

Best Regards,
Deckard

Paul DuBois wrote:
> At 22:11 +0100 10/8/06, Deckard wrote:
>> Hi,
>>
>> How do i dreate a table, let's say:
>>
>> CREATE TABLE wl_articles(wl_articles_id INT NOT NULL AUTO_INCREMENT
>> PRIMARY KEY, title TEXT NOT NULL,
>>  main TEXT NOT NULL, extended TEXT NOT NULL, permalink
>> VARCHAR(255) NOT NULL, date DATE NOT NULL, ip VARCHAR(15), user_agent
>> VARCHAR(50), status INTEGER NOT NULL,
>>  password VARCHAR(32) NOT NULL) TYPE=MyISAM;
>>
>> without allowing INSERTs to repeat rows based on certain fields, for
>> example, "main" and "status" ?
> 
> Normally, you would do this by creating a UNIQUE index on the combination
> of columns.  (Or you could use a PRIMARY KEY if both columns are NOT NULL.)
> 
> However, you cannot do what you want in this case.  Why?  Because main is
> a TEXT column, and TEXT columns allow a maximum of 255 initial characters
> to be indexed.  That means you cannot use a UNIQUE index to provide a
> uniqueness constraint on anything from the 256th character on.
> 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: How to not repeat fields

2006-10-08 Thread Paul DuBois

At 22:21 +0100 10/8/06, Deckard wrote:

Hi,

Ok, naow i have this:

CREATE TABLE wl_users(wl_user_id INT NOT NULL AUTO_INCREMENT, name
VARCHAR(255) NOT NULL, email VARCHAR(50) NOT NULL, password VARCHAR(32)
NOT NULL, PRIMARY KEY (wl_user_id, name, email, password)) TYPE=MyISAM;

and it lets repeated rows.


You have a PRIMARY KEY on all four columns in the table, so every
combination of values for those four columns is required to be unique.

Therefore, if you have repeated rows in the table, that's very strange.

I claim you don't really have repeated rows. :-)

Can you provide a test case that shows repeats?



How can i avoid the repeates rows ?

Best Regards,
Deckard

Paul DuBois wrote:

 At 22:11 +0100 10/8/06, Deckard wrote:

 Hi,

 How do i dreate a table, let's say:

 CREATE TABLE wl_articles(wl_articles_id INT NOT NULL AUTO_INCREMENT
 PRIMARY KEY, title TEXT NOT NULL,
  main TEXT NOT NULL, extended TEXT NOT NULL, permalink
 VARCHAR(255) NOT NULL, date DATE NOT NULL, ip VARCHAR(15), user_agent
 VARCHAR(50), status INTEGER NOT NULL,
  password VARCHAR(32) NOT NULL) TYPE=MyISAM;

 without allowing INSERTs to repeat rows based on certain fields, for
 example, "main" and "status" ?


 Normally, you would do this by creating a UNIQUE index on the combination
 of columns.  (Or you could use a PRIMARY KEY if both columns are NOT NULL.)

 However, you cannot do what you want in this case.  Why?  Because main is
 a TEXT column, and TEXT columns allow a maximum of 255 initial characters
 to be indexed.  That means you cannot use a UNIQUE index to provide a

 > uniqueness constraint on anything from the 256th character on.


--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: How to not repeat fields

2006-10-08 Thread Deckard
Hi,

Yes, it still allows duplicate (equal) rows to be inserted :(

Best Regards,
Deckard

Paul DuBois wrote:
> At 22:21 +0100 10/8/06, Deckard wrote:
>> Hi,
>>
>> Ok, naow i have this:
>>
>> CREATE TABLE wl_users(wl_user_id INT NOT NULL AUTO_INCREMENT, name
>> VARCHAR(255) NOT NULL, email VARCHAR(50) NOT NULL, password VARCHAR(32)
>> NOT NULL, PRIMARY KEY (wl_user_id, name, email, password)) TYPE=MyISAM;
>>
>> and it lets repeated rows.
> 
> You have a PRIMARY KEY on all four columns in the table, so every
> combination of values for those four columns is required to be unique.
> 
> Therefore, if you have repeated rows in the table, that's very strange.
> 
> I claim you don't really have repeated rows. :-)
> 
> Can you provide a test case that shows repeats?
> 
>>
>> How can i avoid the repeates rows ?
>>
>> Best Regards,
>> Deckard
>>
>> Paul DuBois wrote:
>>>  At 22:11 +0100 10/8/06, Deckard wrote:
  Hi,

  How do i dreate a table, let's say:

  CREATE TABLE wl_articles(wl_articles_id INT NOT NULL AUTO_INCREMENT
  PRIMARY KEY, title TEXT NOT NULL,
   main TEXT NOT NULL, extended TEXT NOT NULL, permalink
  VARCHAR(255) NOT NULL, date DATE NOT NULL, ip VARCHAR(15), user_agent
  VARCHAR(50), status INTEGER NOT NULL,
   password VARCHAR(32) NOT NULL) TYPE=MyISAM;

  without allowing INSERTs to repeat rows based on certain fields, for
  example, "main" and "status" ?
>>>
>>>  Normally, you would do this by creating a UNIQUE index on the
>>> combination
>>>  of columns.  (Or you could use a PRIMARY KEY if both columns are NOT
>>> NULL.)
>>>
>>>  However, you cannot do what you want in this case.  Why?  Because
>>> main is
>>>  a TEXT column, and TEXT columns allow a maximum of 255 initial
>>> characters
>>>  to be indexed.  That means you cannot use a UNIQUE index to provide a
>>  > uniqueness constraint on anything from the 256th character on.
> 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Slow Access When Inserting Records

2006-10-08 Thread mos

At 01:56 PM 10/8/2006, Neil Tompkins wrote:

Hi,

We have a mySQL database running version 3.23.58 on a linux machine.

This database is accessed from both a Windows IIS web server and a linuz 
zeus web server. On the linux server I'm not sure of what driver etc is 
installed, however the access time to save a record is far quicker than 
the windows server. On the windows server ODBC driver 3.51 is installed.


We don't appear to have the problem when reading data from the server 
(SELECT FROM etc).


All servers are on the same network.

All data is accessed using ASP (active server pages, vb script).

Any ideas what the problem might be ?
Thanks,
Neil


Neil,
How much quicker is Linux over Windows? How many rows are you 
adding at a time?


The first thing to check is your NIC. How fast is the Windows NIC 
compared to the Linux NIC? Test your network to see what throughput you can 
achieve from each of them. A


Mike 


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Importing a Database (.mpb file)

2006-10-08 Thread Daniel Kasak

David Blomstrom wrote:

Hopeffully this will be the last question in this series. :)

I want to copy a database from my PC to my Apple laptop. I installed MySQL's 
GUI Tools on both computers, created a file named Backup.mpb on my PC, then put 
a copy of it on my Mac. Now I'm trying to figure out how to get Backup.mbp into 
my new MySQL program.

I thought perhaps I could import it with phpMyAdmin, just as I import SQL files, but that 
didn't work. If the database is named "Sky," do I have to create that database 
in my new MySQL program before I can import the Sky backup? What's the easiest way to 
import it?
  


What format is the data in? I don't know what an 'mpb' file is. Did you 
mean 'mdb'? If so, the easiest way is to use one of the data transfer 
utilities listed on the MySQL website. There are some plugins for MS 
Access that will set up your tables and export the data for you. It's 
been a very long time since I looked at these - probably 5 years or so.


--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



How to make a sequence field

2006-10-08 Thread Alexandre Gonçalves Jacarandá
Hello everybody, I need a little tip to do this: in postgresql we can
create sequence numbers and them assign sequence numbers from several
others tables make a reference to this sequence number using nextval.
How can I do this in mysql ?

Thanks, Alexandre


___ 
Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. 
Registre seu aparelho agora! 
http://br.mobile.yahoo.com/mailalertas/ 
 



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: How to make a sequence field

2006-10-08 Thread Chris White
On Monday 09 October 2006 09:39, Alexandre Gonçalves Jacarandá wrote:
> Hello everybody, I need a little tip to do this: in postgresql we can
> create sequence numbers and them assign sequence numbers from several
> others tables make a reference to this sequence number using nextval.
> How can I do this in mysql ?

I did somewhat of a mock sequence generator using stored procedures:

http://www.gen2net.net/articles/mysql-stored-procedures

hope that helps.
-- 
Chris White
PHP Programmer
Interfuel

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MSSQL(B-end) to MYSQL(Front-End) -> InnoDB or MyISAM

2006-10-08 Thread Ady Wicaksono

Is your MSSQL data structure contain such foreign key?

If yes, my isam is not suitable for you

Others... for overall, i prefer innodb :)

On 10/8/06, Ow Mun Heng <[EMAIL PROTECTED]> wrote:

I'm just curious as to which would have better performance for my needs.

backend is a MSSQL server and I want to replicate it into a MySQL
Frontend for user accesses.

replication would be done via "mysqlimport/load data infile". I'm
thinking of doing the inserts something like ever 5 seconds or so.

MyISAM tables are faster than InnoDB, but they are more optimised for
READS than WRITEs, however due to the replication, (being done every 5
secs on ~5 tables), I'm wondering if this will cause performance losses
due to table-locks etc.

Thanks

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MSSQL(B-end) to MYSQL(Front-End) -> InnoDB or MyISAM

2006-10-08 Thread Ow Mun Heng
On Mon, 2006-10-09 at 11:42 +0700, Ady Wicaksono wrote:
> Is your MSSQL data structure contain such foreign key?
> 
> If yes, my isam is not suitable for you

Actually, you know what? I don't really know.
How does one go about checking?

> 
> Others... for overall, i prefer innodb :)

I know it's transaction safe and all, but not too sure if I need the
extra overhead.

> 
> On 10/8/06, Ow Mun Heng <[EMAIL PROTECTED]> wrote:
> > I'm just curious as to which would have better performance for my needs.
> >
> > backend is a MSSQL server and I want to replicate it into a MySQL
> > Frontend for user accesses.
> >
> > replication would be done via "mysqlimport/load data infile". I'm
> > thinking of doing the inserts something like ever 5 seconds or so.
> >
> > MyISAM tables are faster than InnoDB, but they are more optimised for
> > READS than WRITEs, however due to the replication, (being done every 5
> > secs on ~5 tables), I'm wondering if this will cause performance losses
> > due to table-locks etc.
> >
> > Thanks
> >
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
> >
> >


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MSSQL(B-end) to MYSQL(Front-End) -> InnoDB or MyISAM

2006-10-08 Thread Ady Wicaksono

On 10/9/06, Ow Mun Heng <[EMAIL PROTECTED]> wrote:

On Mon, 2006-10-09 at 11:42 +0700, Ady Wicaksono wrote:
> Is your MSSQL data structure contain such foreign key?
>
> If yes, my isam is not suitable for you

Actually, you know what? I don't really know.
How does one go about checking?


Dump it to SQL, and make sure you know how foreign key SQL syntax
See:
 http://www.windowsitlibrary.com/Content/77/12/1.html





>
> Others... for overall, i prefer innodb :)

I know it's transaction safe and all, but not too sure if I need the
extra overhead.


If your concern is fast insert, how fast do you need? is 3000 rows
insert/seconds enough?
if your concern is fast read, tune your innodb buffer, bigger memory
bigger performance :)

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Slow Access When Inserting Records

2006-10-08 Thread Neil Tompkins
Hi,
 
The difference is noticeable (sometimes 15 seconds), as it is being performed 
on a webpage.  The slow server is running at 100mb and ping times to the 
database server are 1ms or less.  
 
Could the problem with be IIS ?
 
Thanks
Neil



> Date: Sun, 8 Oct 2006 17:17:07 -0500> To: mysql@lists.mysql.com> From: [EMAIL 
> PROTECTED]> Subject: Re: Slow Access When Inserting Records> > At 01:56 PM 
> 10/8/2006, Neil Tompkins wrote:> >Hi,> >> >We have a mySQL database running 
> version 3.23.58 on a linux machine.> >> >This database is accessed from both 
> a Windows IIS web server and a linuz > >zeus web server. On the linux server 
> I'm not sure of what driver etc is > >installed, however the access time to 
> save a record is far quicker than > >the windows server. On the windows 
> server ODBC driver 3.51 is installed.> >> >We don't appear to have the 
> problem when reading data from the server > >(SELECT FROM etc).> >> >All 
> servers are on the same network.> >> >All data is accessed using ASP (active 
> server pages, vb script).> >> >Any ideas what the problem might be ?> 
> >Thanks,> >Neil> > Neil,>  How much quicker is Linux over Windows? 
> How many rows are you > adding at a time?> >  The first thing to 
> check is your NIC. How fast is the Windows NIC > compared to the Linux NIC? 
> Test your network to see what throughput you can > achieve from each of them. 
> A> > Mike > > -- > MySQL General Mailing List> For list archives: 
> http://lists.mysql.com/mysql> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]> 
_
Be one of the first to try Windows Live Mail.
http://ideas.live.com/programpage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d

Re: MSSQL(B-end) to MYSQL(Front-End) -> InnoDB or MyISAM

2006-10-08 Thread Ow Mun Heng
On Mon, 2006-10-09 at 13:02 +0700, Ady Wicaksono wrote:
> On 10/9/06, Ow Mun Heng <[EMAIL PROTECTED]> wrote:
> > On Mon, 2006-10-09 at 11:42 +0700, Ady Wicaksono wrote:
> > > Is your MSSQL data structure contain such foreign key?
> > >
> > > If yes, my isam is not suitable for you
> >
> > Actually, you know what? I don't really know.
> > How does one go about checking?
> 
> Dump it to SQL, and make sure you know how foreign key SQL syntax
> See:
>   http://www.windowsitlibrary.com/Content/77/12/1.html

Thanks. I'll take look.

> > > Others... for overall, i prefer innodb :)
> >
> > I know it's transaction safe and all, but not too sure if I need the
> > extra overhead.
> 
> If your concern is fast insert, how fast do you need? is 3000 rows
> insert/seconds enough?

I think That's _way_ enough. Looking through the select (group by
date/time etc) I see the max is ~2000 or so inserts (per Minute :-))


> if your concern is fast read, tune your innodb buffer, bigger memory
> bigger performance :)

My concern is fast reads. Based on
http://www.mysqlperformanceblog.com/2006/09/29/what-to-tune-in-mysql-server-after-installation/

the innodb_buffer_pool_size should be ~70-80% of main memory.




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]