Re: Data in different tables or is one big table just as fast?

2005-02-15 Thread Jacob Friis Larsen
> how about purging rows older than a month? Do you need to keep them? Yes. > Archive them them to another database? We are currently archiving them to another table, where we compress the text. > Actually, I got a better idea. Have your master db which is huge and > holds everything. Then on

Re: insert...select with auto increment

2005-02-15 Thread Michael Dykman
On Tue, 2005-02-15 at 17:56, steve cooley wrote: > How do you you get the next auto increment value? I think I'm running > into the insert...select problem. I want to duplicate records from one > table to the _same_ table, with an incremented auto increment value. > > Can I do something like t

RE: Database creation privileges

2005-02-15 Thread Tom Crimmins
> -Original Message- > From: Tim Traver > Sent: Tuesday, February 15, 2005 19:30 > To: mysql@lists.mysql.com > Subject: Database creation privileges > > Hi all, > > ok, I thought I had it figured out. > > I am using 4.1.9 now, and it looks like it behaves a little bit > differently (or

Re: Repair with keycache

2005-02-15 Thread Kevin A. Burton
Mohamed Badri wrote: thank you for the links, I can't change system variables at runtime, so the only choice I have is, probably, to stop mysql server set variables and then run another ALTER TABLE. ;-( I'm going to siwtch to mysql4 as soon as possible. OH!... yeah... if you're on a <4 ver of

Database creation privileges

2005-02-15 Thread Tim Traver
Hi all, ok, I thought I had it figured out. I am using 4.1.9 now, and it looks like it behaves a little bit differently (or maybe not) than the previous 4.0.20 did when it comes to privileges. I want to create a user that does not have the ability to create databases. But, I do want them to be able

Database creation privileges

2005-02-15 Thread Tim Traver
Hi all, ok, I thought I had it figured out. I am using 4.1.9 now, and it looks like it behaves a little bit differently (or maybe not) than the previous 4.0.20 did when it comes to privileges. I want to create a user that does not have the ability to create databases. But, I do want them to be

Re: Time in VBA for Excel

2005-02-15 Thread Daniel Kasak
Dan Wareham wrote: Hey Dan, Thanks for the post and the code ideas. Unfortuantely I still can't get the thing to work even when trying the CONCAT and CAST functions. As per your request, here is the details of what I have got so far: I'm running MySQL 4.1.9 with MyODBC 3.51. The table in question

Re: LOAD DATA INFILE using 4.0.17

2005-02-15 Thread shaun thornburgh
No just every row needs to be unique. Sorry for the confusion... From: "Robert Dunlop" <[EMAIL PROTECTED]> To: "shaun thornburgh" <[EMAIL PROTECTED]>, Subject: Re: LOAD DATA INFILE using 4.0.17 Date: Tue, 15 Feb 2005 15:06:19 -0800 So what you meant was every field in each row must be unique fro

Re: LOAD DATA INFILE using 4.0.17

2005-02-15 Thread Bastian Balthazar Bux
Sorry for the private answer hitted the wrong replay button. It's possible for you unload data with an SQL like this ? SELECT list, of, fields, MD5 ( CONCAT ( list, of, fields ) ) INTO OUTFILE 'file_name' FROM tab if not (probably, you have csv files), you must use a shell script like this (may

insert...select with auto increment

2005-02-15 Thread steve cooley
How do you you get the next auto increment value? I think I'm running into the insert...select problem. I want to duplicate records from one table to the _same_ table, with an incremented auto increment value. Can I do something like this: insert into table (autoincrement_key, field1, field2)

Re: LOAD DATA INFILE using 4.0.17

2005-02-15 Thread Robert Dunlop
So what you meant was every field in each row must be unique from all other instances in all other rows? Not just each row must be unique? Bob - Original Message - From: "shaun thornburgh" <[EMAIL PROTECTED]> To: Sent: Tuesday, February 15, 2005 2:40 PM Subject: Re: LOAD DATA INFILE usi

Re: LOAD DATA INFILE using 4.0.17

2005-02-15 Thread shaun thornburgh
Hi, Thanks for your reply, but the problem I am facing is that there may be duplicate values in the uploaded file and I dont want these to appear in my table... From: Bastian Balthazar Bux <[EMAIL PROTECTED]> To: shaun thornburgh <[EMAIL PROTECTED]> Subject: Re: LOAD DATA INFILE using 4.0.17 Dat

Re: Repair with keycache

2005-02-15 Thread Mohamed Badri
thank you for the links, I can't change system variables at runtime, so the only choice I have is, probably, to stop mysql server set variables and then run another ALTER TABLE. ;-( I'm going to siwtch to mysql4 as soon as possible. Selon "Kevin A. Burton" <[EMAIL PROTECTED]>: > Mohamed Badri

Re: LOAD DATA INFILE using 4.0.17

2005-02-15 Thread SGreen
"shaun thornburgh" <[EMAIL PROTECTED]> wrote on 02/15/2005 04:53:54 PM: > Hi, > > I have a table with 26 fields, each row in this table must be unique. I > can't define all of the fields to be primary keys as the limit is 16. > Therefore before I insert data I have to check that each row is un

Re: Data in different tables or is one big table just as fast?

2005-02-15 Thread Ryan McCullough
how about purging rows older than a month? Do you need to keep them? Archive them them to another database? Actually, I got a better idea. Have your master db which is huge and holds everything. Then on a seperate DB run a table for each feedid with the last 100 feeds for that id. Have a cron job

Re: auto_increm, forced step back

2005-02-15 Thread SGreen
Gaspar Bakos <[EMAIL PROTECTED]> wrote on 02/15/2005 04:28:26 PM: > Hi, > > My understanding is that with mysql >= 3.23 versions the last value of > an auto_increm column is stored, thus even if records are deleted, when > a new one is inserted (as NULL), values will not be re-used. > This is a f

Re: Data in different tables or is one big table just as fast?

2005-02-15 Thread Jacob Friis Larsen
> >>>We have a table that grow by 200MB each day. > >>>Should we put data in different tables or is one big table just as fast? > > > > The table contains data from RSS and Atom feeds. > > Most users only need to see the newest items. > > A select could look like this: "SELECT title, desc FROM item

LOAD DATA INFILE using 4.0.17

2005-02-15 Thread shaun thornburgh
Hi, I have a table with 26 fields, each row in this table must be unique. I can't define all of the fields to be primary keys as the limit is 16. Therefore before I insert data I have to check that each row is unique. Data is to be inserted into this table from files uploaded to the server - CSV

Re: Repair with keycache

2005-02-15 Thread Kevin A. Burton
Mohamed Badri wrote: Hi, just had a problem with a myisam table who reached 4GB of data, I increased the number of rows by doing : ALTER TABLE foo MAX_ROWS=10 This is EXACTLY what you want: http://www.peerfear.org/rss/permalink/2004/10/16/MySQLAndALTERTABLEGuiltyAsCharged http://www.peer

Repair with keycache

2005-02-15 Thread Mohamed Badri
Hi, just had a problem with a myisam table who reached 4GB of data, I increased the number of rows by doing : ALTER TABLE foo MAX_ROWS=10 mysql server created some temporary files on disk ( 3 hours ) > #sql-7ad2_d6cb95.MYD > #sql-7ad2_d6cb95.MYI > #sql-7ad2_d6cb95.frm and now the proce

auto_increm, forced step back

2005-02-15 Thread Gaspar Bakos
Hi, My understanding is that with mysql >= 3.23 versions the last value of an auto_increm column is stored, thus even if records are deleted, when a new one is inserted (as NULL), values will not be re-used. This is a fine attribute, but is there any way to override it? That is, to bump back the c

Re: MySQL/InnoDB-4.1.10 is released

2005-02-15 Thread Heikki Tuuri
Asad, InnoDB type tables have enforced FOREIGN KEY constraints since 2001. Unfortunately, none of the table types of MySQL yet supports CHECK constraints. Best regards, Heikki . List: mysql Subject:Re: MySQL/InnoDB-4.1.10 is released From: Asad Habib Date:

Re: MySQL/InnoDB-4.1.10 is released

2005-02-15 Thread Asad Habib
Are foreign key and other constraints enforced by the db server in this version or is this something that the programmer has to ensure via application logic? - Asad On Tue, 15 Feb 2005, Heikki Tuuri wrote: > Hi! > > InnoDB is the MySQL table type that supports foreign keys, transactions, > non-

Re: join speed vs. 2 queries

2005-02-15 Thread Peter Brawley
Matthew, >...is there a benefit to doing the INNER JOIN in the FROM clause >rather than creating a join condition in the WHERE clause? I rewrote >the query a bit using the WHERE join condition and noticed a slight >performance hit on this particular query... There are (at least) three benefits to p

MySQL/InnoDB-4.1.10 is released

2005-02-15 Thread Heikki Tuuri
Hi! InnoDB is the MySQL table type that supports foreign keys, transactions, non-escalating row-level locking, all SQL-92 transaction isolation levels, multiversion concurrency control, savepoints, multiple tablespaces, and a non-free online binary hot backup tool. MySQL-4.1.10 is mainly a bugf

Dual Xeon EM64T fedora3 x86_64

2005-02-15 Thread Paul Chinen - NB
Hello, I just installed MySQL-server-4.0.23-0.x86_64.rpm on Dual Xeon 3.2 64 bit 8G of RAM with Fedora3 x86_64. I noticed (doing a ps ax|grep mysql) that there is only one mysqld process running. Is this normal? BR Paul -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysq

timezone questions

2005-02-15 Thread Elim Qiu
Dear list, I never tried any timezone features(options) of mysql and like to learn from you. (1) In what situation one need to set mysql timezone? (I know there are application level timezone solutions) (2) What the effect if a custome timezone is settled with mysql? I use mysql for web ap

MySQL Network and You

2005-02-15 Thread Arjen Lentz
Hi all, So what does the buzz about MySQL Network mean, for you? And what about licensing? I wrote an article about all that: MySQL Network and You. http://dev.mysql.com/tech-resources/articles/mysql-network-and-you.html In a nutshell: - Some people spend time to save money, and MySQL Communi

Re: one hour is/is not 60 minutes, that's the question...

2005-02-15 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, schlubediwup <[EMAIL PROTECTED]> writes: mysql> select addtime(now(), '00:00:00'); > ++ > | addtime(now(), '00:00:00') | > ++ > | 2005-02-15 16:49:17| > ++ > 1 row in set (0.

RE: one hour is/is not 60 minutes, that's the question...

2005-02-15 Thread Tom Crimmins
The minute part of a time expression only has a valid range of 0 to 59. http://dev.mysql.com/doc/mysql/en/date-and-time-functions.html http://dev.mysql.com/doc/mysql/en/time.html --- Tom Crimmins Interface Specialist Pottawattamie County, Iowa > -Original Message- > From: schlubediwup

Re: one hour is/is not 60 minutes, that's the question...

2005-02-15 Thread Victor Pendleton
Is the DATE_ADD(time, INTERVAL) an option? SELECT Now(), DATE_ADD(Now(), interval 60 minute) schlubediwup wrote: Hi again mysql-listers mysql> select version(); ++ | version() | ++ | 4.1.9-standard-log | ++ 1 row in set (0.00 sec)

Re: one hour is/is not 60 minutes, that's the question...

2005-02-15 Thread Martijn Tonies
Hello, > mysql> select version(); > ++ > | version() | > ++ > | 4.1.9-standard-log | > ++ > 1 row in set (0.00 sec) > > mysql> Although I'm not fully aware of MySQL time/date symantecs, I would like to make a comment... > > mys

RE: Unable to start MySQL

2005-02-15 Thread J.R. Bullington
2 things -- 1) Permissions on your /mysql/data/ directory. User mysql needs to have ownership, group mysql needs to have ownership as well. shell> groupadd mysql shell> useradd -g mysql mysql shell> chown -R root /path/to/mysql/. shell> chown -R mysql /path/to/mysql/data/. shell> chgrp

Re: one hour is/is not 60 minutes, that's the question...

2005-02-15 Thread Rich Lafferty
On Tue, Feb 15, 2005 at 06:48:08PM +0100, schlubediwup <[EMAIL PROTECTED]> wrote: > Hi again mysql-listers > > > mysql> select addtime(now(), '00:60:00'); <<< > ++ > | addtime(now(), '00:60:00') | > ++ > | NULL

one hour is/is not 60 minutes, that's the question...

2005-02-15 Thread schlubediwup
Hi again mysql-listers mysql> select version(); ++ | version() | ++ | 4.1.9-standard-log | ++ 1 row in set (0.00 sec) mysql> [EMAIL PROTECTED]:~> uname -a Linux mydom 2.6.4-54.5-default #1 Fri May 7 21:43:10 UTC 2004 i686 i686 i3

Unable to start MySQL

2005-02-15 Thread Jason Williard
Hello, I have been trying to install and run MySQL on a Redhat Enterprise machine. The installation appears to go just fine, but when I go to run it, MySQL doesn't startup. Here is what I have done so far: INSTALLATION: ./configure --with-openssl=/usr/local/ssl --with-openssl-includes=/usr/local

Re: join speed vs. 2 queries

2005-02-15 Thread Mathew Ray
Many Thanks Peter, I appreciate your response. Played around with the indexes, and modified the query a bit more to match the campaignId of the value first and got a 2000x performance increase from the original query...now it takes .03 seconds on average where it used to take 60. One question t

RE: LOAD DATA INFILE Opposite

2005-02-15 Thread Mike Johnson
From: shaun thornburgh [mailto:[EMAIL PROTECTED] > Hi, > > The following function loads data from a file: > > http://dev.mysql.com/doc/mysql/en/load-data.html > > Is there a function like this that I can use to save the > results of a query to a CSV file for the user of my PHP > application

LOAD DATA INFILE Opposite

2005-02-15 Thread shaun thornburgh
Hi, The following function loads data from a file: http://dev.mysql.com/doc/mysql/en/load-data.html Is there a function like this that I can use to save the results of a query to a CSV file for the user of my PHP application to donwload? Thanks for your help -- MySQL General Mailing List For lis

Capitalize first letter

2005-02-15 Thread Georges EL OJAIMI
Hello, 1-I am trying to capialize the first letter of each word in a ceratin filed: SELECT CONCAT( UPPER( SUBSTRING( cat_name, 1, 1 ) ) , LOWER( SUBSTRING( cat_name, 2 ) ) ) FROM `cateogries` It is only doing it for the first word. if the category has more than one word separated by (space) th

Re: how to make question that check the last hour

2005-02-15 Thread Ian Sales (DBA)
Jesper Andersson wrote: Hello, I relly new with databases and writing sql-questions. But in my db want I to check what have new rows have come the last hour. the db have I as follow: ID email created updated 001 [EMAIL PROTECTED] 20050215131034 20050215133401 06

Re: how to make question that check the last hour

2005-02-15 Thread Alec . Cawley
"Jesper Andersson" <[EMAIL PROTECTED]> wrote on 15/02/2005 13:15:43: > Hello, > > I relly new with databases and writing sql-questions. > > But in my db want I to check what have new rows have come the last hour. > > the db have I as follow: > > ID email created upd

how to make question that check the last hour

2005-02-15 Thread Jesper Andersson
Hello, I relly new with databases and writing sql-questions. But in my db want I to check what have new rows have come the last hour. the db have I as follow: ID email created updated 001 [EMAIL PROTECTED] 20050215131034 20050215133401 063 [EMAIL PROTECTE

MySQL 4.1.10 has been released

2005-02-15 Thread Joerg Bruehe
Hi, MySQL 4.1.10, a new version of the popular Open Source/Free Software Database Management System, has been released. It is now available in source and binary form for a number of platforms from our download pages at http://dev.mysql.com/downloads/ and mirror sites. Note that not all mirror sit

Re: last_insert_id

2005-02-15 Thread mel list_php
really sorry to bother you with my connections problems. I've made a test using select connection_id(), to see what was the current identifier for my connection. Each time I change of page, the connection_id is different, I suppose that is because I require my connection file at the beginning

Re: last_insert_id

2005-02-15 Thread mel list_php
I just would ask for a precision: In my system, I include a connection file with my parameters (host,user,pass).This is the details of the account allowed to establish the connection with the mysql server. When 2 users are connecting to the database (through the web), they will use the same deta

How to plan the Tablespace in a huge mysql?

2005-02-15 Thread proace Tsai
Hello: The mysql server is estimated to be as follows, 1. two servers, one is master and the other is slaves (replication) 2. two databases in mysql 3. 513 tables in each database 4. about 300 rows in each table 5. about 2T disk space for each server using SAN Storage 6. backup database period

Re: last_insert_id

2005-02-15 Thread mel list_php
Yes that's what I mean I arranged to have single queries for the inserts. For example I avoid doing a select on criteria to retrieve that id an then an update of this id. thanks for help!!! From: Philippe Poelvoorde <[EMAIL PROTECTED]> Reply-To: "'mysql@lists.mysql.com '" To: mel list_php <[EMA

instable behaviour of mysql

2005-02-15 Thread schlubediwup
Hi in the meantime i installed mysql> select version(); ++ | version() | ++ | 4.1.9-standard-log | ++ 1 row in set (0.07 sec) mysql> [EMAIL PROTECTED]:~> uname -a Linux rosetta 2.6.4-54.5-default #1 Fri May 7 21:43:10 UTC 2004 i68

Re: instable behaviour of mysql

2005-02-15 Thread Gabriel PREDA
First of all you have an eroneus update statement: UPDATE SET activ = 'inactiv' WHERE ident = 'fai' After UPDATE the tablename must be pesent UPDATE `tble_name` SET activ = 'inactiv' WHERE ident = 'fai' Now next in line... REVOKE all ON fai_accounts FROM 'fai'@'mydom.tld' You are revok

Re: MySQL on AIX 5.2

2005-02-15 Thread Joerg Bruehe
Hi Ben, all! Am Di, den 15.02.2005 schrieb Ben Clewett um 11:28: > Forget the question, I have found my answer, thanks! > > The answer is in MySQL manual, section 2.12.5.3. > > Seems AIX default to max 256MB memory without compilation options. Then > a max of 2GB is possible. Yes, this is an

Re: last_insert_id

2005-02-15 Thread Philippe Poelvoorde
mel list_php wrote: Hi! I have a database where several users can connect and input data. I managed to have my insert queries as atomic, but I was wondering about one special case: I make one insert, and retrieve the last id inserted by mysql because I need to update an other table with that id.

instable behaviour of mysql

2005-02-15 Thread schlubediwup
Hi turns me crazy: no reply button found in your ... mailing-list. Hello. Please send us an ouput of the following statement, which you should perform in the middle of your test case: show grants for current_user(); THIS IS THE OUTPUT: DROP TABLE fai_accounts DROP TABLE fai_contacts DROP TABLE fai

Re: last_insert_id

2005-02-15 Thread Alec . Cawley
"mel list_php" <[EMAIL PROTECTED]> wrote on 15/02/2005 10:18:55: > Hi! > > I have a database where several users can connect and input data. > > I managed to have my insert queries as atomic, but I was wondering about one > special case: I make one insert, and retrieve the last id inserted by

Re: last_insert_id

2005-02-15 Thread Johan Höök
Hi, You can probably use "SELECT LAST_INSERT_ID()" which keeps auto-increment values on a per connection basis. See: http://dev.mysql.com/doc/mysql/en/getting-unique-id.html /Johan mel list_php wrote: Hi! I have a database where several users can connect and input data. I managed to have my insert

Re: MySQL on AIX 5.2

2005-02-15 Thread Ben Clewett
Forget the question, I have found my answer, thanks! The answer is in MySQL manual, section 2.12.5.3. Seems AIX default to max 256MB memory without compilation options. Then a max of 2GB is possible. Ben Ben Clewett wrote: Dear user, Slightly off topic, but knowing that there seems to be somebod

last_insert_id

2005-02-15 Thread mel list_php
Hi! I have a database where several users can connect and input data. I managed to have my insert queries as atomic, but I was wondering about one special case: I make one insert, and retrieve the last id inserted by mysql because I need to update an other table with that id. - if one user inser

Re: Time in VBA for Excel

2005-02-15 Thread Dan Wareham
Hey Dan, Thanks for the post and the code ideas. Unfortuantely I still can't get the thing to work even when trying the CONCAT and CAST functions. As per your request, here is the details of what I have got so far: I'm running MySQL 4.1.9 with MyODBC 3.51. The table in question is the Users tabl

MySQL on AIX 5.2

2005-02-15 Thread Ben Clewett
Dear user, Slightly off topic, but knowing that there seems to be somebody here who knows anything, I need advise from an AIX expert :) Trying to run MySQL 4.1.8 on AIX 5.2.0.0. Finding it cannot malloc more than about 90 MB for whole MySQL. Sample error: 050215 8:44:41 InnoDB: Fatal error:

Re: Can I dissable transactions?

2005-02-15 Thread Ben Clewett
Jeff, Thanks for your idea. Deleting data x rows at a time would certainly help, if AUTOCOMMIT=TRUE. But I have no idea how :) I have tried: DELETE FROM very_large_table WHERE delete_flag=1 LIMIT 10; But the LIMIT is not understood (4.1.8). Unfortunately my 'delete_flag' is not key. There