INNODB transaction log size

2004-06-28 Thread Michael Lee
Hi, I would like to migrate my DB from Sybase ASE to MySQL INNODB table. Data has been extracted and stored as a file. I want to use the command Load Data Infile to insert the data to MySQL. However, some table contains millions of rows. Can i control the batch size of the loading (e.g.

Duplicate selection with change

2004-06-28 Thread Scott Haneda
4.0.18-standard I need to duplicate a select of records, all in the same table, but also make a change to one field. Here is one table I need to do this on ++---+--+-++ | Field | Type | Null | Key | Default|

Re: Duplicate selection with change

2004-06-28 Thread Scott Haneda
on 06/27/2004 11:31 PM, Scott Haneda at [EMAIL PROTECTED] wrote: So, I need to basically: SELECT iamge_title, image_filename, image_url, image_width, image_height from images where user_id = '123'; Then, take that result and insert all those rows in the same table, setting type='2' and

Mysql on Solaris vs Linux

2004-06-28 Thread Aamir Baig
Hello All, We recently ran a few tests on mysql on both solaris and linux environments. It turned out that mysql was much faster and responsive on linux. After doing some digging, we found out one of the possible reasons is the fact that mysql source code uses malloc all over the place. On

SQL challenge

2004-06-28 Thread John Mistler
O.K. you SQL gurus-- I have a difficult query for you that has me stumped. The table has two columns: rowID (MEDIUMINT-but *NOT* AUTO_INCREMENT) and theDate (DATETIME). I need it to find: 1. The COUNT of REPEATED instances of the rowID in the last month. - so if there are 5 rows with the same

Re: SQL challenge

2004-06-28 Thread Martijn Tonies
Hi John, O.K. you SQL gurus-- I have a difficult query for you that has me stumped. The table has two columns: rowID (MEDIUMINT-but *NOT* AUTO_INCREMENT) and theDate (DATETIME). I need it to find: 1. The COUNT of REPEATED instances of the rowID in the last month. - so if there are 5

Re: SQL challenge

2004-06-28 Thread Jigal van Hemert
From: John Mistler [EMAIL PROTECTED] I have a difficult query for you that has me stumped. The table has two columns: rowID (MEDIUMINT-but *NOT* AUTO_INCREMENT) and theDate (DATETIME). I need it to find: 1. The COUNT of REPEATED instances of the rowID in the last month. This is relatively

Re: SQL challenge

2004-06-28 Thread Roger Baklund
* John Mistler I have a difficult query for you that has me stumped. The table has two columns: rowID (MEDIUMINT-but *NOT* AUTO_INCREMENT) and theDate (DATETIME). I need it to find: 1. The COUNT of REPEATED instances of the rowID in the last month. - so if there are 5 rows with the same

Re: [MySQL] Duplicate selection with change

2004-06-28 Thread Ashley M. Kirchner
Scott Haneda wrote: So, I need to basically: SELECT iamge_title, image_filename, image_url, image_width, image_height from images where user_id = '123'; Then, take that result and insert all those rows in the same table, setting type='2' and added=NOW() I think I need to do a subselect, the docs

Error in JDBC retrieval of mediumint column (mysql4.1.2b-alpha-win and java-3.1.2-alpha driver)

2004-06-28 Thread Oliver Chua
To be able to use subqueries, I'm now using mysql-4.1.2b-alpha-win.zip I'm using mysql-connector-java-3.1.2-alpha.zip as my jdbc driver to connect to the db... I'm selecting some columns from a table where the column is created using mediumint. Somehow, after creation, it becomes mediumint(9)

SQLException when retrieving resultset containing mediumint (4.1.2b-alpha-win db and java-3.1.2-alpha driver)

2004-06-28 Thread Oliver Chua
I'm using mysql-4.1.2b-alpha-win.zip and mysql-connector-java-3.1.2-alpha.zip to access db via JDBC. The column is mediumint(9) It was created using type mediumint, somehow it was changed to mdiumint(9) I think there may be a problem in the size... java.sql.SQLException: Unknown type '9 in

triggers or stored procedures

2004-06-28 Thread Carlos J Souza
hello all What is more important? triggers or stored procedures. I think that triggers they are a lot more important than stored proc. because stored procs they can be implemented in the front end application. In the version 5 should be implemented triggers instead of stored procedures.

error replicating from mysql3.23.36 to mysql4.0.18

2004-06-28 Thread [EMAIL PROTECTED]
(excuse for my english) all proccess is ok.. the replication starts.. but, a few minutes later, mysql shows me this error: Last_error: Error 'Table 'eshablar_new.contadorZs' doesn't exist' on query 'UPDATE contadorZs set indCont = indCont + 1 where idUser = 2394'. Default database:

Re: triggers or stored procedures

2004-06-28 Thread Martijn Tonies
Hi Carlos, What is more important? triggers or stored procedures. I think that triggers they are a lot more important than stored proc. because stored procs they can be implemented in the front end application. Then they wouldn't be Stored Procedures anymore would they :-) In the version 5

Re: triggers or stored procedures

2004-06-28 Thread Josh Trutwin
On Mon, 28 Jun 2004 07:11:04 -0300 Carlos J Souza [EMAIL PROTECTED] wrote: hello all What is more important? triggers or stored procedures. I think that triggers they are a lot more important than stored proc. because stored procs they can be implemented in the front end application.

Rows Counter

2004-06-28 Thread Javier Diaz
Hi everyone I need have a row counter in a query but I'm not sure if there is any way to do this. In essence all I need is get a result like this: Counter column-A column-B 1 A-1 B-1 2 A-2 B-2 : : : :

RE: triggers or stored procedures

2004-06-28 Thread Gilbert Wu
Hi, I would agree with Martijn that both features are important. It is like arguing if air conditioning is more important than automatic gearbox when you buy a car. They are both useful but which one you go for depends on where and how you drive the car. Personally, I would have both and also

slow query when searching database of over 2 million records

2004-06-28 Thread Aasef Iqbal
Hi, I am working on a web project project where one of my pages has to show a count of total number of matches found and short text for few of them, just like a search engine. I need to issue two queries first one fetches a count for total matches found and second query finds detail to

Re: Flowing Text Into Multiple Columns

2004-06-28 Thread Parker Morse
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sunday, Jun 27, 2004, at 12:31 US/Eastern, David Blomstrom wrote: Suppose I want to display an entire field, but not in one long column. Instead, I want to flow it evenly into several columns. [snip] I haven't yet learned of a way to do this with

RE: slow query when searching database of over 2 million records

2004-06-28 Thread Victor Pendleton
Have you ran an explain plan on the query to identify the execution path? -Original Message- From: Aasef Iqbal To: [EMAIL PROTECTED] Sent: 6/28/04 6:15 AM Subject: slow query when searching database of over 2 million records Hi, I am working on a web project project where one of my

RE: SQLException when retrieving resultset containing mediumint ( 4.1.2b-alpha-win db and java-3.1.2-alpha driver)

2004-06-28 Thread Victor Pendleton
Can you post the code or sql that you are attempting to execute that is throwing tis error? -Original Message- From: Oliver Chua To: [EMAIL PROTECTED] Sent: 6/28/04 5:08 AM Subject: SQLException when retrieving resultset containing mediumint (4.1.2b-alpha-win db and java-3.1.2-alpha

Re: Duplicate selection with change

2004-06-28 Thread SGreen
You got it!! That is the easiest way to duplicate data while changing(setting) certain columns to new values. WTG! Shawn Green Database Administrator Unimin Corporation - Spruce Pine

RE: INNODB transaction log size

2004-06-28 Thread Victor Pendleton
I do not believe this is currently an option in the `load data infile` syntax. One option would be to read the file programmatically and issue the commits after `x` number of inserts. -Original Message- From: Michael Lee To: [EMAIL PROTECTED] Sent: 6/28/04 1:21 AM Subject: INNODB

Re: triggers or stored procedures

2004-06-28 Thread SGreen
Carlos, I think you have a misunderstanding about what a trigger is or does. A trigger is, in its most basic form, an automatically executed stored procedure. The ability to detect an event is pointless withouth the ability to do something once that event occurs. We have to have the one

Re: slow query when searching database of over 2 million records

2004-06-28 Thread SGreen
You should only need to do your second query and use the SQL_CALC_FOUND_ROWS and a new query using SELECT FOUND_ROWS()to minimize the number of times you need to _actually_ search your database. see: http://dev.mysql.com/doc/mysql/en/SELECT.html and:

character sets on client or server?

2004-06-28 Thread Marten Lehmann
Hello, do I need the character sets on the client side or just on the server? Client and server are different servers, so I want to reduce the client-package to a minimum: /usr/bin/mysql /usr/bin/mysqldump /usr/bin/mysqlshow /usr/lib/mysql/libmysqlclient* I don't need man-pages et cetera. So,

MySQL Storage Engines and Table Types.....

2004-06-28 Thread Scott Fletcher
Hi! How do I know which of the storage engine am I using or running, or whatever that use the databases/tables? Thanks, Scott F.

RE: MySQL Storage Engines and Table Types.....

2004-06-28 Thread Victor Pendleton
Do a show variables from the MySQL monitor. show variables; -Original Message- From: Scott Fletcher To: [EMAIL PROTECTED] Sent: 6/28/04 10:27 AM Subject: MySQL Storage Engines and Table Types. Hi! How do I know which of the storage engine am I using or running, or whatever

select and update field in one query

2004-06-28 Thread darren
Hi all, I need to select the top 1000 records based on the usage field and update the checked field to '1'. I am currently doing it in 2 statements; i.e. select first then update from a MYSQL_ROW array. How do I do it in just a single statement? Please advice on a better way. Also...will doing

Re: MySQL Storage Engines and Table Types.....

2004-06-28 Thread SGreen
You can see a list of the available storage types with SHOW ENGINES To see which engine is in use for any table you can SHOW TABLE STATUS or SHOW CREATE TABLE tablename All of these commands, and more, are documented at : http://dev.mysql.com/doc/mysql/en/SHOW.html Yours, Shawn Green Database

Re: select and update field in one query

2004-06-28 Thread Rhino
- Original Message - From: darren [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 28, 2004 11:42 AM Subject: select and update field in one query Hi all, I need to select the top 1000 records based on the usage field and update the checked field to '1'. I am currently

Re: select and update field in one query

2004-06-28 Thread SGreen
I would personally do it in three statements. The first one creates a temporary table from the results of the (SELECT) below. The second is the update with a JOIN to the temporary table. The third drops the temporary table. Doing it that way avoids the need to scroll through your recordset

sql join statement that I do not understand

2004-06-28 Thread Joseph Norris
Group, First of all thanks to anyone who can respond to this - I am really stumped. I have been trying to figure this one out and maybe someone out there with a little deep understanding of joins in sql can give me a hand. I am working on a system that creates these sql statements on the fly

UNION with INTO OUTFILE and ORDER BY

2004-06-28 Thread Josh Trutwin
Noticed something interesting about UNION and INTO OUTFILE If I do this: (SELECT a FROM b) UNION (SELECT a INTO OUTFILE 'out.txt' FROM c); The query executes - no results printed to the screen but rather saved to the out.txt file, as intended. But if I do: (SELECT a FROM b) UNION (SELECT a

RE: slow query when searching database of over 2 million records

2004-06-28 Thread Amit_Wadhwa
Use MySQL Query Caching -Original Message- From: Aasef Iqbal [mailto:[EMAIL PROTECTED] Sent: Monday, June 28, 2004 4:46 PM To: [EMAIL PROTECTED] Subject: slow query when searching database of over 2 million records Hi, I am working on a web project project where one of my pages has to

Re: Error in JDBC retrieval of mediumint column (mysql4.1.2b-alpha-win and java-3.1.2-alpha driver)

2004-06-28 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Oliver Chua wrote: To be able to use subqueries, I'm now using mysql-4.1.2b-alpha-win.zip I'm using mysql-connector-java-3.1.2-alpha.zip as my jdbc driver to connect to the db... I'm selecting some columns from a table where the column is

Re: sql join statement that I do not understand

2004-06-28 Thread SGreen
Joseph, You actually had 3 joined statements. Here are your queries isolated from the rest of your posting (and slightly reformatted): 1) an INNER JOIN (aka an 'equijoin') using the comma format select cs_fld_cs_tbl_l.cs_type ,field_name ,name ,type ,type_sql

Re: select and update field in one query

2004-06-28 Thread Michael Stassen
I'm assuming you want the rows with the top 1000 usage values. Why not just do it in 1 UPDATE statement? UPDATE yourtable SET checked = 1 ORDER BY usage DESC LIMIT 1000; This should work for any mysql 4.x.x, according to the manual http://dev.mysql.com/doc/mysql/en/UPDATE.html. Michael

Re: Performance issues

2004-06-28 Thread Jeremy Zawodny
On Tue, Jun 22, 2004 at 01:34:39PM -0400, Aram Mirzadeh wrote: We have an internal SNMP monitoring system that is monitoring about 10,000 devices. Each device is pinged then pulled for about an average of 25-30 elements. Each of the ping results and elements are then stored in text file,

Re: Performance issues

2004-06-28 Thread SGreen
Have you thought about using Merge tables? If you have a sliding 5 minute monitoring window that you need to query frequently you could create a smaller MERGE table to hold to 6 minutes worth of data composed of six tables of one minute's data each. At the end of each minute, you create a new

Job announcement?

2004-06-28 Thread Michael Halligan
Greetings. My company has an immediate opening in SF for a Sr. Mysql/DB architect. I was wondering if this would be the appropriate list to post such an announcement? Michael -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: Query Help

2004-06-28 Thread SGreen
You need to flip the business table around your join so that you get all of the businesses listed and check for the appropriate NULL values in the other tables. This will give you all of the business that neither have a record in 2004 nor will they be part of package 16 SELECT * FROM business

Re: SQL challenge

2004-06-28 Thread John Mistler
Wow, that was it! I changed the WHERE to (because I wasn't clear): . . . WHERE theDate BETWEEN SUBDATE(CURDATE(), INTERVAL 1 MONTH) AND CURDATE() . . . Now, I have just one more that I still am stumped by, if anyone (Roger or other) has a second: Given theTable with 2 columns: rowID

Re: Performance issues

2004-06-28 Thread Andrew Pattison
By default MySQL flushes keys to disk with every INSERT, hence the performance degredation with performing several single INSERTs one after the other. The following extract from the MySQL documentation hints at one way of changing this on a per-table basis: a.. Declaring a MyISAM table with the

Re: Performance issues

2004-06-28 Thread Jeremy Zawodny
On Mon, Jun 28, 2004 at 09:21:04PM +0100, Andrew Pattison wrote: By default MySQL flushes keys to disk with every INSERT, hence the performance degredation with performing several single INSERTs one after the other. The following extract from the MySQL documentation hints at one way of

Re: Query Help

2004-06-28 Thread SGreen
Here's another variant: All businesses with a record in any year but 2004 that have a package other than 16. (This will not find any businesses who have records ONLY in 2004 or that ONLY have package 16.) SELECT * FROM business AS b INNER JOIN records AS r on b.b_id=r.r_b_id AND

Question of Multi Character Set

2004-06-28 Thread Fei Jiangnan
Hi there, I have Mysql 4.1.1 runing on Redhat Linux 9, both of them are English Version. Now, I need a table which my user can input both Chinese and English, so I create a DB as following: DROP database IF EXISTS user; CREATE DATABASE IF NOT EXISTS user CHARACTER SET utf8; use user; DROP

reading past bogus data in log event error in binary log in 4.0.18 ?

2004-06-28 Thread Bill Earl
Hello everyone, We're having a problem with replication. The servers are all running 4.0.18 under SuSE Linux 9.1 Professional. I noticed that the two slaves were both showing a status of I/O thread not running. In the mysqld.log file for both slaves I found the following entry: 040628

Re: Job announcement?

2004-06-28 Thread David Griffiths
I've seen job announcements posted on other lists (and I think this one as well). I think it's relevant, and shouldn't offend anyone. David Michael Halligan wrote: Greetings. My company has an immediate opening in SF for a Sr. Mysql/DB architect. I was wondering if this would be the appropriate

mysql client connectivity and orphaned connections

2004-06-28 Thread Jim
Hi, I'm just wondering if anyone can tell me exactly what happens when one is using the mysql client on a remote server and the connection to that server (in this case over ssh) gets dropped. In this case, I was in the midst of a long OPTIMIZE TABLE. Stepped out to get some coffee and the ssh

Re: mysql client connectivity and orphaned connections

2004-06-28 Thread Eric Bergen
When a connection is dropped most read only queries will be immediatly dropped, write queries such as your optimize table will continue until they complete as not to corrupt any table data or leave anything unfinished. -Eric On Mon, 28 Jun 2004 17:29:22 -0400, Jim [EMAIL PROTECTED] wrote: Hi,

time on tenth of secounds

2004-06-28 Thread Matthias Eireiner
Hi there, I'm currently writing a tool for managing time during a competition. My problem is, that I want to save the time with the fraction of seconds. as far as I know MySQL is fine with something like D HH:MM:SS.fraction, but doesn't store the fraction. Is there anything that could fix that

Job Announcement, Sr Database Developer - San Francisco

2004-06-28 Thread Michael Halligan
The company I'm hiring is looking for somebody very senior to help architect a very modular MySQL, Linux, and Java based infrastructure. The official posting is below, but what we need is : - Very senior with MySQL development - Oracle experience to help facilitate a conversion project - MySQL

Replication corruption and 64 bit mysql

2004-06-28 Thread Matthew Kent
After several long days trying to fix this I'm running out of ideas. Master: RedHat 7.3 kernel 2.4, MySQL 4.0.20 32 bit (mysql.com rpm) - Slave: Fedora Core 2 64 bit kernel 2.6.5, MySQL-Max-4.0.20-0 64 bit (mysql.com rpm) In a varying amount of time after a few hundred thousand queries

Re: MySQL Storage Engines and Table Types.....

2004-06-28 Thread Eric Bergen
Show table status\G Will give you a list of tables the Type: field for each table is the storage engine. Your installation probably defaults to MyISAM -Eric On Mon, 28 Jun 2004 11:51:40 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: You can see a list of the available storage types

Re: reading past bogus data in log event error in binary log in 4.0.18 ?

2004-06-28 Thread Eric Bergen
I had this same problem. This isn't fool proof or recomended but what i ended up doing was calling mysqlbinlog over and over again incrementing --position (or --offset i can't remember) until it picked up a good record again and kept going. Chances are you will lose queries but it does work.

Re: sql join statement that I do not understand

2004-06-28 Thread Garth Webb
On Mon, 2004-06-28 at 09:32, Joseph Norris wrote: Group, First of all thanks to anyone who can respond to this - I am really stumped. I have been trying to figure this one out and maybe someone out there with a little deep understanding of joins in sql can give me a hand. I think you're

Select compare to current date

2004-06-28 Thread Robb Kerr
Need help with a SQL Select statement. I've got a table that consists of a list of years (1930-2014). I need to create a drop-down list on my page that consists of a list of years between 1930 and the current year. How do I construct this SELECT? See below... SELECT * FROM table WHERE

RE: Select compare to current date

2004-06-28 Thread David Rodman
]= ]=What's the syntax for year of current date? YEAR(NOW()) (rtfm..:-) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Migrating Access Tables -- Empty Columns, Date and Time

2004-06-28 Thread Robert L Cochran
I'm migrating a Microsoft Access 2002 (Service Pack 3) table constructed by my wife to a corresponding table in MySQL 4.0.20. Some columns in most of the 3000+ rows are empty. Some of these are contiguous empty columns. I don't know if Access considers them NULL or not, but when you export an

Re: Select compare to current date

2004-06-28 Thread John Mistler
This one I can help you with: SELECT year-field FROM table WHERE YEAR(year-field) = YEAR(CURDATE()); - John on 6/28/04 4:49 PM, Robb Kerr at [EMAIL PROTECTED] wrote: Need help with a SQL Select statement. I've got a table that consists of a list of years (1930-2014). I need to create a

RE: INNODB transaction log size

2004-06-28 Thread Michael Lee
Victor, Thanks for your reply. Actually, i cannot find such an option and want to see if i have missed something. Referring to Innodb transaction log, I do some more searching and would like to confirm what i found from the web (this information is not available in MySQL documentation) .

Full text practices

2004-06-28 Thread East Bay Technologies
I am looking for information on the proper way to code full text queries and more information on how they work. I am especially interested in how to code for multi word queries... for example : Searching for : 'today is the day' Select * from table1 where match field1 against ('today is the

Re: Full text practices

2004-06-28 Thread mos
At 10:24 PM 6/28/2004, you wrote: I am looking for information on the proper way to code full text queries and more information on how they work. http://dev.mysql.com/doc/mysql/en/Fulltext_Search.html I am especially interested in how to code for multi word queries... for example : Searching for

Where is the utf8_general_ci collation in sources?

2004-06-28 Thread Dainis Polis
Hi All! Where to find subj.? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Where is the utf8_general_ci collation in sources?

2004-06-28 Thread Paul DuBois
At 7:53 +0300 6/29/04, Dainis Polis wrote: Hi All! Where to find subj.? strings/ctype-utf8.c, I believe. -- 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:

Re: GUID storage

2004-06-28 Thread Ray Kiddy
Nowhere in this discussion was this question. Is it in the plans to have a 128 bit numeric column type for MySQL? If so, in what kind of time frame? If not, why not? Character arrays are obviously, but they are probably not the best way to get optimal performance. Native support for a 128 bit

C API -- huge result sets slowin me down

2004-06-28 Thread Matt Eaton
Hi all, I was hoping this was the right place for a question about the C API. I've been grabbing result sets from tables in the C API for a few years now, but I'm starting to work with result sets that are big enough to bog me down. Of course, the result sets aren't insanely big, so I was

Re: GUID storage

2004-06-28 Thread Dan Nelson
In the last episode (Jun 28), Ray Kiddy said: Is it in the plans to have a 128 bit numeric column type for MySQL? If so, in what kind of time frame? If not, why not? I don't know of any 32-bit compiler that provides a 128-bit integer type, which means for most platforms mysql would have to