Re: strange table speed issue

2004-06-25 Thread Michael Stassen
I'm not certain, but I don't think a multi-column index will help here. The manual is unclear on how a multi-column index is used when you are comparing the first key part to a range rather than to a constant, but I get the impression it doesn't use the second key part in that case. For you,

RE: strange table speed issue

2004-06-25 Thread MerchantSense
Great idea! Unfortunately: mysql SELECT MAX(ip_end - ip_start) FROM ip2org; ++ | MAX(ip_end - ip_start) | ++ | 100663295 | ++ 1 row in set (12.24 sec) -Original Message- From: Michael Stassen

Re: ENUM vs TINYINT

2004-06-25 Thread Brian Mansell
Cemal, I recall hearing a similar question mentioned in a previous email thread. In fact, here it is:

Any MySQL + IBM Power CPU Hardware (pSeries, iSeries, JS20, Blade) Users?

2004-06-25 Thread Zak Greant
Greetings All! MySQL AB is interested in talking to MySQL users who running MySQL on IBM Power CPU server hardware (pSeries, iSeries, JS20 Blade). If you (or someone you know) are willing to chat with us, please let me know at [EMAIL PROTECTED] Thank you for your help! Cheers! -- Zak Greant

info about MySQL Server

2004-06-25 Thread Alfredo Marchini
Dear Sir, Sergei Golubchik gives me this e-mail address telling me that you can help me about a project that my company is developing. we need to develope a J2SE project that works on N MYSQL 4.0.20 servers installed on the same machine. Now I try to explain my problem. The Hardware, actually,

error 27

2004-06-25 Thread J S
Hi, I got an error 27. DBD::mysql::st execute failed: Got error 27 from table handler at /home/u752359/logfile.pl line 144, PS_F line 3079464. The FAQs say: Check whether you have hit 2 Gb limit. If that is not the case, shutdown MySQL server and repair a table with (my)isamchk. How do I check

Re: MySQL Crashing On Index Creation/Select count(*) statement - InnoDB tables

2004-06-25 Thread Dr. Frank Ullrich
David, David Griffiths wrote: We are in the process of setting up a new MySQL server. It's a dual-Opteron (Tyan Thunder K8S motherboard) with 6 gig of DDR333 RAM (registered) and an LSI SCSI card with 6 SCSI drives (5 in a RAID-5 array, with one hot-spare) running SuSE Enterprise 8.1 (64-bit).

Repair Table and USE_FRM

2004-06-25 Thread Dan Cumpian
Is there any harm in using the USE_FRM directive by default whenever repairing a table? Thanks, Dan --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.703 / Virus Database: 459 - Release Date: 6/10/2004

Re: innodb and backup

2004-06-25 Thread [EMAIL PROTECTED]
i have been reading.. and i have found 3 ways to have a copy of mysql master datas for initilize the mysql slave ( always having in mind innodb compatibility ) 1) FLUSH TABLES WITH READ LOCK see the 'SHOW MASTER STATUS' sentence shutdown master database copy all data, log and .frm files

Re: Repair Table and USE_FRM

2004-06-25 Thread Sergei Golubchik
Hi! On Jun 25, Dan Cumpian wrote: Is there any harm in using the USE_FRM directive by default whenever repairing a table? Yes. See http://bugs.mysql.com/4252 Regards, Sergei -- __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Sergei Golubchik [EMAIL PROTECTED] / /|_/ / // /\ \/

Re: Master Slave Problem.

2004-06-25 Thread Kieran Kelleher
Pierre, Myslave working status is different to yours and as you can see there are values missing in yours such as Master_Log_File, etc. It seems your slave is not establishing successful replication communication with the master. What is your SLAVE IP address? What does your MASTER my.ini file

how to bind mysql to a certain ip-address?

2004-06-25 Thread Marten Lehmann
Hello, I was reading through the documentation, but I couldn't find anything on how to bind mysql to a certain ip-address. The only thing I found was how to bind mysql to a different port: mysqld_safe --port=port_number But I don't want mysql to listen on all interfaces. Regards Marten -- MySQL

Re: info about MySQL Server

2004-06-25 Thread SGreen
Alfredo, I have just a few additional questions that you did not already answer in your very well-formed post. I normally wouldn't worry about ANY of these issues but you seem to be exploring the envelope of performance on your system and every little bit counts: Which communication path are

Re: how to bind mysql to a certain ip-address?

2004-06-25 Thread Sergio Salvi
bind-address is what you need. http://dev.mysql.com/doc/mysql/en/Server_options.html []s, Sergio. On Fri, 25 Jun 2004, Marten Lehmann wrote: Hello, I was reading through the documentation, but I couldn't find anything on how to bind mysql to a certain ip-address. The only thing I found

RE: error 27

2004-06-25 Thread J S
Could this problem be due to the size of my tables? Is there a limit on how big the table can be? I'm using mysql-standard-4.0.20. -rw-rw 1 mysqlmysql2147483647 Jun 25 01:49 internet_usage.MYD -rw-rw 1 mysqlmysql622724096 Jun 25 01:49 internet_usage.MYI Hi, I got an

Re: ENUM vs TINYINT

2004-06-25 Thread Tim Brody
If you want to use as little space as possible use char(0) and null/not-null for your boolean values: CREATE TEMPORARY TABLE test_bool (i char(5), bool char(0)); INSERT INTO test_bool VALUES ('true',''),('false',null),('true',''),('true',''),('false',null); SELECT * FROM test_bool WHERE bool is

Location of files

2004-06-25 Thread Ron McKeever
Is there any benefit to having the .MYD files on one drive, and the .MYI on its own dedicated hard drive?? rm -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: info about MySQL Server

2004-06-25 Thread Alfredo Marchini
Hi, thank you very much for your reply. Now I answer you about your additional questions: Now the daemon is installed on a machine different than DB Server, so I use DBServer NIC IP Address for connect to it from the daemon (So I don't use Unix Sockets). But, looking at the Network Bandwidth,

R: info about MySQL Server

2004-06-25 Thread Leonardo Francalanci
try removing your client for the moment: can you try a load data infile and see at what speed mysql loads the rows? -Messaggio originale- Da: Alfredo Marchini [mailto:[EMAIL PROTECTED] Inviato: venerdì 25 giugno 2004 18.21 A: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL

RE: error 27

2004-06-25 Thread Donny Simonton
Yes, if you are using a dynamic table which means it has varchar's, text, or blobs the limit is 2 gigs. If you are using a fixed table which uses chars only, then there is no limit that I have seen. Donny -Original Message- From: J S [mailto:[EMAIL PROTECTED] Sent: Friday, June 25,

Why won't mysql use the index? WAS: strange table speed issue

2004-06-25 Thread MerchantSense
This is crazy. If someone can help me out, I'll pay them! A table: +--+-+--+-+-+---+ | Field| Type| Null | Key | Default | Extra | +--+-+--+-+-+---+ | ip_start | bigint(20) | | MUL | 0 |

Re: Optimising SQL Statements

2004-06-25 Thread SGreen
Martin, 1) I would insure there is an index on both TABLEY2.y_id and Y_TABLE.y_id 2) I would change the subselect in your insert statement to be a LEFT JOIN... WHERE xxx IS NULL. INSERT INTO X(column1) SELECT Y.y_id FROM Y_TABLE Y LEFT JOIN TABLEY2 t2 ON t2.y_id = Y.y_id WHERE t2.y_id IS

RE: Why won't mysql use the index? WAS: strange table speed issue

2004-06-25 Thread emierzwa
The general rule of thumb (in Sybase not sure for MySQL), is if using an index hits more than 10% of the tables total volume it is faster/cheaper/less evasive on the drive to just table scan the table opposed to read an index row, get the representing table row pointer and seek the table for each

RE: error 27

2004-06-25 Thread J S
I don't really understand the difference (I need to read up a bit more). My (default mysql) table internet_usage has the following columns: uid varchar (10) ip bigint time datetime urlid int size int Is there something I can do to this to fix it so that it can grow larger than 2 GB? The 'uid'

RE: Optimising SQL Statements

2004-06-25 Thread Matt Chatterley
Hi Martin, Speaking more from a general standpoint (I mostly work with MS SQL, but my home projects are MySQL - these days there is precious little time for those, though).. Assuming you have appropriate indexes on tables y and y2: 1. Truncate WILL be faster than delete, as it is a non-logged

RE: Why won't mysql use the index? WAS: strange table speed issue

2004-06-25 Thread SGreen
Here is what the manual says about the table scan threshold: (http://dev.mysql.com/doc/mysql/en/Where_optimisations.html) Each table index is queried, and the best index is used unless the optimizer believes that it will be more efficient to use a table scan. At one time, a scan was used based

RE: error 27

2004-06-25 Thread Donny Simonton
Yep, modify the uid from a varchar to a char. It will make your table bigger, because char uses all 10 characters. But it will allow you to get past the 2 gig limit. It will take a while for the table to be modified though. But it's definitely worth the wait. Also personally I would change

RE: Why won't mysql use the index? WAS: strange table speed issue

2004-06-25 Thread MerchantSense
Hi Sean - thanks for the info, unfortunately, I can't use force index ...too old a version of mysql I wonder if there is some way to trick mysql into using an index? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, June 25, 2004 11:16 AM To:

What is the difference between creating one key with multiple fields, and creating multiple keys, one per field?

2004-06-25 Thread Joshua Beall
Hi All, I have noticed that in phpMyAdmin, when I create a table and select the columns I want indexed, if I select two or more columns (say fname and lname) to be indexed, then when the table is created, instead of two keys, I have only one key, and it contains both the fname and lname columns.

RE: OUTFILE to CVS with headers

2004-06-25 Thread Mike Koponick
Bob, That did the trick! Thanks! Mike -Original Message- From: Bessares, Bob [mailto:[EMAIL PROTECTED] Sent: Thursday, June 24, 2004 6:03 PM To: [EMAIL PROTECTED]; Mike Koponick Subject: RE: OUTFILE to CVS with headers well, you can easily output into a comma separated file but the

Re: What is the difference between creating one key with multiple fields, and creating multiple keys, one per field?

2004-06-25 Thread Michael Stassen
Which is better depends on the sort of queries you will most often run. The short version: A multi-column index on lname,fname (order matters) would be used for SELECT ... WHERE lname='Smith' AND fname = 'Joe'; and SELECT ... WHERE lname='Smith'; but could not be used for SELECT ... WHERE

Re: R: info about MySQL Server

2004-06-25 Thread SGreen
Alfredo, It seems funny to me that with 2 servers dealing with 2 sets of data streams at the same time that you didn't see a performance boost. This is leading me to think that it's either the application or the SCSI controller not keeping up. It makes sense that if you open up a second server

Memory to Memory INSERTS

2004-06-25 Thread Alejandro Heyworth
Hi! I'm looking for a better way to insert large numbers of rows from a client application that is sampling physical data in real-time. In our case, we are using a C double hipvalues[100] cyclical array to buffer our sampled values. We're currently creating large query strings similar to:

RE: error 27

2004-06-25 Thread J S
Thanks for your reply. I had to change the IP column to bigint because mysql was inserting the wrong value when it was just int. Is this the correct command to change to chars ? ALTER TABLE internet_usage CHANGE uid CHAR(10); Yep, modify the uid from a varchar to a char. It will make your

Using CASE for store values

2004-06-25 Thread ColdFusion Lists
Hi allit's possible to use the CASE clause in MySQLlike this:SELECT statusID, Case(statusID = 1, TotalStatus1=TotalStatus1 + 1) Case(statusID = 2, TotalStatus2 = TotalStatus2 +1) It's possible? How to do that? Thanx for your time.Crie seu Yahoo! Mail, agora com 100MB de espaço, anti-spam e

Re: MySQL Crashing On Index Creation/Select count(*) statement - InnoDB tables

2004-06-25 Thread David Griffiths
Frank, We used the 64-bit source to compile 4.0.20, and we used the 32-bit binaries. The problem was tracked down at about 1am - it was the kernel (or the SCSI drivers). We put a 3Ware SATA Raid-5 card in, and all the crashes went away. There are 64-bit binaries, but we had some problems with

Re: Using CASE for store values

2004-06-25 Thread SGreen
Kinda sorta but not really Your SELECT isn't against a table so I don't what TotalStatus1 and TotalStatus2 are . Are they fields? Are they variables? Assuming you have a tables called stores and you wanted to update one of two columns based on a value in a third: UPDATE stores SET

Re: error 27

2004-06-25 Thread Michael Stassen
J S wrote: Thanks for your reply. I had to change the IP column to bigint because mysql was inserting the wrong value when it was just int. Are your ips IPv4 (4 byte) or IPv6 (8 byte)? I'm guessing IPv4. In that case: mysql SELECT INET_ATON('0.0.0.1'), INET_ATON('255.255.255.255');

Re: Optimising SQL Statements

2004-06-25 Thread Martin Gainty
Thanks Shawn! Marty Gainty (cell) 617-852-7822 From: [EMAIL PROTECTED] To: Martin Gainty [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: Optimising SQL Statements Date: Fri, 25 Jun 2004 12:59:28 -0400 MIME-Version: 1.0 Received: from lists.mysql.com ([213.136.52.31]) by mc3-f2.hotmail.com

Which constraint failed?

2004-06-25 Thread David Rodman
When an INSERT operation returns an error 1216 (parent row does not exist, FK constraint failed), and there are multiple FK constraints in the target table, how do you know which one failed? Brute force method will work, of course (do a select on each foreign key in its referenced table).

Re: load data into 2 tables and set id

2004-06-25 Thread J S
Hi Shawn, I wondered if you might be able to help me with an SQL query. I want to list all the internet sites I've surfed in my database. Here's a query that matches the url with a urlid: SELECT concat(usc.scheme,://,us.server,up.path) FROM url_visit uv INNER JOIN url_servers us ON

Re: load data into 2 tables and set id

2004-06-25 Thread J S
Figured it out! Took a gamble and run the below command! SELECT iu.time, INET_NTOA(iu.ip), concat(usc.scheme,://,us.server,up.path) FROM url_visit uv INNER JOIN internet_usage iu ON iu.urlid=uv.urlid INNER JOIN url_servers us ON us.id=uv.url_server_ID INNER JOIN url_paths up

Using SQL query to populate a html form select field

2004-06-25 Thread Kyle Texan
I want to take 1 field in a mysql table and use that information to populate an html form select field instead of writing the html code, that way when data changes in that mysql field the form will always be in sync with the table? -- MySQL General Mailing List For list archives:

Query Help

2004-06-25 Thread Michael Baerwolf
Hello, I'm having some problems with a join I've been trying. Here's the table structure CREATE TABLE `business` ( `b_id` int(5) NOT NULL auto_increment, `b_name` varchar(100) default NULL, `b_contact` varchar(100) default NULL, `b_address` varchar(100) default NULL, `b_city`

Populating a SELECT from a database

2004-06-25 Thread David Rodman
Here's a way to do it with PHP: function field_select($table, $field) {$result = mysql_query(SELECT $field FROM $table) or die(mysql_error()); print SELECT NAME=\ . $field . \\n; $limit = mysql_num_rows($result); for($i = 0; $i $limit; ++$i) {list($value) =