Re: Replication bin log rollover....

2003-07-07 Thread Jeff Kilbride
I remember seeing this same question a few months ago, so you might try the archives. I'm pretty sure the answer was that mysql continues incrementing to 4 digits. If you have a dev box, you could create a .999 binlog and put it in your bin-index file -- then start mysql, issue a flush logs

Re: Help with Proper SQL to Limit number of rows

2003-04-01 Thread Jeff Kilbride
Hi Roger, Quick rundown. Table: Assignments CaseID auto_increment FileNumber char(18) FirstName char(20) LastName char(20) and on and on and on Indexes on CaseID (Primary) FileNumber Name (LastName, FirstName) What I would like to do is something along the lines of SELECT CaseID

Re: load data infile not being replicated properly....

2003-04-01 Thread Jeff Kilbride
Another problem with load data and replication? I've identified 2 confirmed bugs in the last 2 releases. Honestly, I've pretty much given up on using load data on my master server for the time being. I'm now using scripts that generate extended insert statements instead. --jeff - Original

Re: Memory Leak

2003-03-29 Thread Jeff Kilbride
- Original Message - From: Jeremy Zawodny [EMAIL PROTECTED] To: Jeff Kilbride [EMAIL PROTECTED] Cc: Lopez David E-r9374c [EMAIL PROTECTED]; 'DeepBlue' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, March 28, 2003 10:05 PM Subject: Re: Memory Leak On Fri, Mar 28, 2003 at 10:46:52AM

Re: Memory Leak

2003-03-28 Thread Jeff Kilbride
I've heard some bad things about turning off swap on Linux. I think it was on Jeremy Z.'s Blogger page. If he sees this maybe he can comment. DeepBlue, take a look in the support-files directory under your MySQL install directory. There are 4 example my.cnf files for various memory/box

Re: Problem starting 4.0.12 server

2003-03-26 Thread Jeff Kilbride
Make sure that all the files inside your database directories are owned by mysql: chown -R mysql. database dir The dot at the end of mysql above sets the group to mysql also. The -R means set the permissions recursively. Each time I install a binary distribution and run the

BUG: Load data infile replication - 3.23.56

2003-03-25 Thread Jeff Kilbride
Replication doesn't seem to be replicating LOAD DATA INFILE correctly in 3.23.56. Starting with a master and slave that were in sync, I imported a file: --- MASTER mysql select count(*) from list where sourceID=0; +--+ | count(*) | +--+ |0 |

Re: Why Replication stops ?

2003-03-25 Thread Jeff Kilbride
- Original Message - From: Jeremy Zawodny [EMAIL PROTECTED] To: hemanth [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 11:45 PM Subject: Re: Why Replication stops ? On Wed, Mar 26, 2003 at 01:00:33PM +0530, hemanth wrote: Hi Jeremy, Many Thanks for your

Re: List-ID Header

2003-03-23 Thread Jeff Kilbride
It seems to be this way on all the lists -- the java.mysql.com List-ID header is missing, too. --jeff - Original Message - From: Joseph Bueno [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: mysql-list [EMAIL PROTECTED] Sent: Sunday, March 23, 2003 1:43 AM Subject: List-ID Header Hello,

Re: load data infile question

2003-03-21 Thread Jeff Kilbride
What's the error you're getting? What OS are you running on? If it's *nix, make sure the file you are trying to load, and the full path to that file, is readable by the user mysql runs as. I once had some files in a user's home directory I was trying to load and although the file was

Re: Please tell me why to use KEY (a_id, b_id) rather than KEY (a_id), KEY (b_id)

2003-03-18 Thread Jeff Kilbride
- Original Message - From: Daevid Vincent [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 18, 2003 4:59 PM Subject: RE: Please tell me why to use KEY (a_id, b_id) rather than KEY (a_id), KEY (b_id) Ah ha! So if I had: CREATE TABLE `rep_table` ( `rep_id` smallint(5)

Re: Select newest records

2003-03-14 Thread Jeff Kilbride
I'm assuming you're IDs are getting bigger, so how about ordering them in descending order? SELECT ID, title, article FROM news ORDER BY ID DESC LIMIT 2 Also, if you're starting from 0, you don't need to include that in the LIMIT clause. --jeff - Original Message - From: Todd W [EMAIL

Re: mysql encripted password from perl

2003-02-28 Thread Jeff Kilbride
How about: my $sql = INSERT INTO apidbusers VALUES (?, password(?)); --jeff - Original Message - From: Jianping Zhu [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 28, 2003 2:48 PM Subject: Re: mysql encripted password from perl sth-execute($username,

Re: BUG? 3.23.55 not replicating LOAD DATA INFILE

2003-02-20 Thread Jeff Kilbride
: BUG? 3.23.55 not replicating LOAD DATA INFILE From: Egor Egorov Date: Thu, 20 Feb 2003 14:07:02 +0200 On Thursday 20 February 2003 01:04, Jeff Kilbride wrote: I have one master and two slaves all running 3.23.55-max on RedHat 7.3. I've had replication up and running smoothly for several

Re: BUG? 3.23.55 not replicating LOAD DATA INFILE

2003-02-20 Thread Jeff Kilbride
of this problem? Thanks, --jeff - Original Message - From: Guilhem Bichot [EMAIL PROTECTED] To: Jeff Kilbride [EMAIL PROTECTED] Cc: Heikki Tuuri [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, February 20, 2003 1:06 PM Subject: Re: BUG? 3.23.55 not replicating LOAD DATA INFILE Hi

BUG? 3.23.55 not replicating LOAD DATA INFILE

2003-02-19 Thread Jeff Kilbride
I have one master and two slaves all running 3.23.55-max on RedHat 7.3. I've had replication up and running smoothly for several days. Today, I decided to try out LOAD DATA INFILE on the master. After successfully loading on the master, I checked both slaves and neither one had the new data. There

Re: Optimizing Ext3 for MySQL

2003-01-15 Thread Jeff Kilbride
- Original Message - From: Jeremy Zawodny [EMAIL PROTECTED] To: Jeff Kilbride [EMAIL PROTECTED] Cc: MySQL [EMAIL PROTECTED] Sent: Wednesday, January 15, 2003 10:41 AM Subject: Re: Optimizing Ext3 for MySQL On Tue, Jan 14, 2003 at 11:33:54PM -0800, Jeff Kilbride wrote: Are there any

Re: Optimizing Ext3 for MySQL

2003-01-15 Thread Jeff Kilbride
Roussey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: 'Jeff Kilbride' [EMAIL PROTECTED] Sent: Wednesday, January 15, 2003 4:04 PM Subject: Re: Optimizing Ext3 for MySQL I use ext3 and have a qps of anywhere from 2800-8000 and use the defaults with no problems. Have you tried: iostat -k 1 to look

Re: recreating master.info for a slave

2003-01-15 Thread Jeff Kilbride
What about just issuing a PURGE MASTER LOGS TO master-bin.007 on the master and then starting the slave without a master.info file? I think that will recreate it for you -- but you should research this before trying... --jeff - Original Message - From: James Fidell [EMAIL PROTECTED] To:

Optimizing Ext3 for MySQL

2003-01-14 Thread Jeff Kilbride
Are there any general guidelines for optimizing ext3 for MySQL? I have a perl script that runs 200K + updates into my database once a day and I see pretty wildly fluctuating query/sec numbers using Jeremy Z's mytop program. I've seen in excess of 2000 qps and then seen that number drop to 40 qps.

Re: Limit and Order by

2002-12-05 Thread Jeff Kilbride
What version of MySQL are you using? The order by and limit clauses should work the way you want them to, not the way you are describing -- i.e. it should order first and then return the top 100 rows. I use this kind of sql statement all the time in the reports I write. I'm not sure if any older

Re: DateTime Calculations

2002-12-03 Thread Jeff Kilbride
Try this: select sec_to_time(unix_timestamp(column_two) - unix_timestamp(column_one)) Should give you the elapsed time in hh:mm:ss format. --jeff - Original Message - From: Peter Abilla [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 03, 2002 8:45 AM Subject: DateTime

Re: displaying a letter based on a query value

2002-11-24 Thread Jeff Kilbride
select if(captain = 1, 'C', '') from stats where captain 0 and number = $number group by number This returns 'C' whenever the captain field is 1 and '' (empty string) otherwise. --jeff - Original Message - From: Alex Behrens [EMAIL PROTECTED] To: DL Neil [EMAIL PROTECTED]; MYSQL [EMAIL

Re: Replication Error

2002-10-22 Thread Jeff Kilbride
RESET MASTER RESET SLAVE This is a handy page to bookmark, if you're doing replication: http://www.mysql.com/doc/en/Replication_SQL.html --jeff - Original Message - From: walt [EMAIL PROTECTED] To: Lewis Watson [EMAIL PROTECTED] Cc: mysql [EMAIL PROTECTED] Sent: Tuesday, October 22,

Re: Query using the same table twice

2002-10-15 Thread Jeff Kilbride
Commas in the FROM clause are the same as INNER JOIN. To make it clearer and easier to understand, I'd write it something like this: SELECT psh.StatID, pt1.TeamName AS Home, pt2.TeamName AS Visitor, psh.GameDate FROM PH_TEAMS pt1, PH_TEAMS pt2, PH_SCORE_HEADER psh WHERE psh.Home = pt1.TeamID AND

Re: Query using the same table twice

2002-10-15 Thread Jeff Kilbride
- Original Message - From: Paul DuBois [EMAIL PROTECTED] To: Jeff Kilbride [EMAIL PROTECTED]; Michael J. Mitchell [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, October 15, 2002 6:46 PM Subject: Re: Query using the same table twice At 18:03 -0700 10/15/02, Jeff Kilbride wrote

Re: Default data dir

2002-10-14 Thread Jeff Kilbride
You can relocate an entire database with a symbolic link: ln -s /path/to/database/files /var/lib/mysql/database_name --jeff - Original Message - From: Niranjan Patel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, October 14, 2002 10:50 AM Subject: Default data dir Hello In

Re: Default data dir

2002-10-14 Thread Jeff Kilbride
Not on a per database basis, that I know of. Anybody else? --jeff - Original Message - From: Niranjan Patel [EMAIL PROTECTED] To: Jeff Kilbride [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, October 14, 2002 11:19 AM Subject: Re: Default data dir I get that point

Re: Mysql vs. Oracle and concat '||'

2002-09-26 Thread Jeff Kilbride
Hi Frank, You can use the concat() function: select concat(numer, ',', text) from Table. The online docs for MySQL contain a great reference for functions: http://www.mysql.com/doc/en/Functions.html --jeff Hi all, I'm a DBA in the Oracle World. I want to make a sql query in mysql,

Re: OT: Multiple Referral Levels

2002-09-25 Thread Jeff Kilbride
Not really a MySQL question, but... The way you have it now definitely won't work. Your select statement for getting the number of referrals for level one will always return a count of one -- because id is the primary key of your table. One way to do this, without listing all the referrals in a

Re: 3.23.52 hitting system loads of 25+?

2002-08-31 Thread Jeff Kilbride
Michael, what compiler/version did you use? Thanks, --jeff - Original Message - From: Michael Bacarella [EMAIL PROTECTED] To: John Stanforth [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, August 31, 2002 6:58 AM Subject: Re: 3.23.52 hitting system loads of 25+? We

Re: High volume HEAP table

2002-08-19 Thread Jeff Kilbride
HEAP tables can have more than one index, but indexes only match = and != -- so you can't use , , etc... Also, comparisons only match the entire index, not the left-most prefix like MyISAM tables. There are a few other quirks, also: http://www.mysql.com/doc/en/HEAP.html --jeff On Sunday 18

Re: 3.23.51 problems

2002-07-15 Thread Jeff Kilbride
Your /tmp directory is only accessible by root? What distribution are you using? /tmp is normally world readable/writeable. I would think you'd have problems with other software, too, if this wasn't setup correctly. --jeff - Original Message - From: Rob Lambden [EMAIL PROTECTED] To:

Re: date subtraction error

2002-07-14 Thread Jeff Kilbride
You can't subtract dates like that. You need to use the built in date/time functions. See the following: http://www.mysql.com/doc/D/a/Date_calculations.html http://www.mysql.com/doc/D/a/Date_and_time_functions.html Your query would be something like this: SELECT TO_DAYS(completion_date) -

Re: Replication - Error reading packet from server: (server_errno=1159)

2002-07-10 Thread Jeff Kilbride
Yeah, I'm getting these errors all the time on 3.23.51, also. I agree that the slave_net_timeout variable is definitely not being paid any attention. However, I'm not comfortable just upping the net_read_timeout without knowing what other effects it might have. --jeff - Original Message

Re: Replication - Error reading packet from server: (server_errno=1159)

2002-07-10 Thread Jeff Kilbride
Is there a web-based interface for bug reporting? Or is there a way to use the mysqlbug program when my database machine isn't connected to the internet? Thanks, --jeff - Original Message - From: Jeremy Zawodny [EMAIL PROTECTED] To: Mark Hughes [EMAIL PROTECTED] Cc: Nilesh Shah [EMAIL

Replication errors

2002-07-03 Thread Jeff Kilbride
I have replication running successfully between two Linux boxes running 3.23.51. However, I'm getting the following error very frequently (every 30 - 60 seconds) in my slave error log: - 020703 15:41:09 Error reading packet from server: (server_errno=1159) 020703

Re: Load problems with 3.23.51

2002-06-24 Thread Jeff Kilbride
What about using the skip-name-resolve option rather than skip-grant-tables? I'm using the 3.23.51 binaries, also, and would appreciate knowing if this makes a difference. Debian potato 2.95.2 is a known good compiler, too, isn't it Jeremy? I may have to recompile my own anyway to change

Re: Understanding relational database setup/construction

2002-06-22 Thread Jeff Kilbride
I haven't tried it, yet, but this looks like an interesting alternative for a try-before-you-buy method of selecting books: http://safari.informit.com/mainhom.asp?home You can subscribe to a list of books monthly and have full access to them online. If you take a look at this, I would recommend

MySQL, ext3 and noatime

2002-06-20 Thread Jeff Kilbride
Does mounting ext3 MySQL data directories with the noatime option improve performance? I ran across an article that said it really helped with ext2 and was wondering if the same benefits applied with ext3. Thanks, --jeff -

Replication logging

2002-06-18 Thread Jeff Kilbride
I've got replication working between my two machines, however the err log gets a lot of these errors: --- 020618 20:41:18 Error reading packet from server: (server_errno=1159) 020618 20:42:18 Slave: Failed reading log event, reconnecting to retry, log 'db1-bin.002'

Re: MySQL AB: Need documentation clarification

2002-06-11 Thread Jeff Kilbride
both InnoDB and MyISAM keep also dynamically statistics about tables. In most cases running ANALYZE TABLE does not bring any benefit in query optimization. Personally, I'm pretty shocked to hear you say this. I was under the impression that running ANALYZE TABLE was a good thing and helped

Re: mysql_pconnect doesn't work in php

2002-05-28 Thread Jeff Kilbride
php's pconnect opens a connection for every process that accesses the database. The webserver processes don't share the connections, but later accesses on the same process re-use the previous connection. It's very likely that when you hit your php script, you're going to get a different webserver

Re: new functions in MySQL ?

2002-05-23 Thread Jeff Kilbride
Try here: http://www.mysql.com/doc/A/d/Adding_functions.html --jeff - Original Message - From: a a [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 23, 2002 6:14 AM Subject: new functions in MySQL ? Hi, Can we create and add new functions in MySQL with windows NT. This

Re: SELECT and WHERE clause

2002-05-23 Thread Jeff Kilbride
You should also get rid of the quotes, so MySQL doesn't have to convert from string to integer: SELECT team_id,name FROM team WHERE deleted != 1 ORDER BY 'name' --jeff - Original Message - From: Steve Buehler [EMAIL PROTECTED] To: Keith C. Ivey [EMAIL PROTECTED]; [EMAIL PROTECTED]

Re: Best book on MySQL

2002-05-15 Thread Jeff Kilbride
is why I finally chose MySQL. Thanks again, --jeff - Original Message - From: mos [EMAIL PROTECTED] To: Jeff Kilbride [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, May 15, 2002 8:14 AM Subject: Re: Best book on MySQL At 04:34 PM 5/14/2002, you wrote: I'd be interested in how

Re: Best book on MySQL

2002-05-15 Thread Jeff Kilbride
: Jeff Kilbride [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 14, 2002 4:33 PM To: Michael Grover; [EMAIL PROTECTED] Subject: Re: Best book on MySQL Hi Mike, What did you think of Firebird vs. MySQL? I haven't seen any comparisons by people who have used both. Thanks, --jeff

Re: Problem with DDL

2002-05-14 Thread Jeff Kilbride
I don't think quoted identifiers are supported in 3.22.x. --jeff - Original Message - From: Steve Edberg [EMAIL PROTECTED] To: Elliot L. Tobin [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, May 13, 2002 3:42 PM Subject: Re: Problem with DDL 'when' is a reserved word:

Re: Best book on MySQL

2002-05-14 Thread Jeff Kilbride
ported several applications from Firebird 1.0 to MySQL 4. The main things I ran into was little SQL Syntax differences, Stored procedures, and Triggers... mike Paul DuBois wrote: At 13:40 -0700 5/11/02, Jeff Kilbride wrote: MySQL Paul DuBois New Riders Plus, he's here

Re: NOW()

2002-05-13 Thread Jeff Kilbride
The first timestamp field in any table is always updated when the row changes: http://www.mysql.com/doc/D/A/DATETIME.html If you don't want this behavior, use a date or datetime field instead. --jeff - Original Message - From: Damnish [EMAIL PROTECTED] To: Edilson Vasconcelos de Melo

Re: Problem with DDL

2002-05-13 Thread Jeff Kilbride
WHEN is listed as a reserved word: http://www.mysql.com/doc/R/e/Reserved_words.html --jeff - Original Message - From: Elliot L. Tobin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, May 13, 2002 1:22 PM Subject: Problem with DDL I pulled this DDL from a MySQL server and am

Re: Best book on MySQL

2002-05-11 Thread Jeff Kilbride
MySQL Paul DuBois New Riders Plus, he's here on the list answering questions... :) --jeff - Original Message - From: Todd Cary [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, May 11, 2002 8:43 AM Subject: Best book on MySQL I need to convert a PHP app from using Interbase

Re: Strategies for maintaining tables calculated from other tables?

2002-05-03 Thread Jeff Kilbride
MySQL has a column type for that, so you don't have to use an INT or BIGINT: http://www.mysql.com/doc/S/E/SET.html --jeff - Original Message - From: Harald Fuchs [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 03, 2002 4:19 AM Subject: Re: Strategies for maintaining tables

Re: ensuring that I'm getting the correct last insert ID

2002-05-02 Thread Jeff Kilbride
Just make sure you call the last_insert_id() function before returning the connection to the pool. If you're using the mm.mysql driver in Java, you can cast the statement object to an org.gjt.mm.mysql.Statement object and use it's getLastInsertID() method: long lastInsertID =

Re: Re: How to Count(*) with LIMIT

2002-05-02 Thread Jeff Kilbride
That would give the correct result, but it would still physically count all the rows in the table which takes too long. This code will execute every time a web page opens that has a grid. Some of the grid pages are quite large, 1 million rows. The person who designed the web page originally

Re: FullText Search 3.23.49-nt

2002-05-02 Thread Jeff Kilbride
Fulltext search is based on relevance. If the words you're searching for appear in over 50% of the rows, MySQL assumes they aren't relevant because they occur too often. Try inserting more rows with different info in the fields that have the fulltext index -- then try your search again. --jeff

Re: select by total goals

2002-04-30 Thread Jeff Kilbride
Try: SELECT SUM(goals) AS leaders FROM stats GROUP BY [player_field] ORDER BY leaders DESC --jeff - Original Message - From: Alex Behrens [EMAIL PROTECTED] To: MYSQL [EMAIL PROTECTED] Sent: Tuesday, April 30, 2002 6:55 PM Subject: select by total goals hey guys, I'm working on a

Re: Problem with JDBC2 driver across databases

2002-04-25 Thread Jeff Kilbride
First, I would recommend upgrading to the latest release of mm.mysql -- which I think is 2.0.12. You can get the latest from sourceforge: http://mmmysql.sourceforge.net/ 2.0.4 is pretty old now. --jeff - Original Message - From: Alan Jones [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent:

Re: SQL Question...

2002-04-07 Thread Jeff Kilbride
The other way to do this is with the DATE_ADD function: select [columns] where [date column] DATE_ADD(NOW(), INTERVAL -7 DAY) --jeff - Original Message - From: Chuck PUP Payne [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Sunday, April 07, 2002 10:29 AM Subject: Re:

Re: DATE_ADD ?

2002-04-01 Thread Jeff Kilbride
Use a combination of the DATE_ADD function and the NOW function: SELECT DATE_ADD(NOW(), INTERVAL 20 MINUTE) --jeff - Original Message - From: Edilson Vasconcelos de Melo Junior [EMAIL PROTECTED] To: MYSQL [EMAIL PROTECTED] Sent: Monday, April 01, 2002 12:04 PM Subject: DATE_ADD ?

Re: problem with '

2002-03-31 Thread Jeff Kilbride
http://www.php.net/manual/en/function.addslashes.php http://www.php.net/manual/en/function.stripslashes.php --jeff - Original Message - From: Alex Behrens [EMAIL PROTECTED] To: Son Nguyen [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Sunday, March 31, 2002 11:35 AM Subject: Re: problem

Replication and indexing...

2002-03-29 Thread Jeff Kilbride
Do the tables on the slave machine have to be *exactly* the same as the tables on the master? Is it possible to have different indexes on the slave? I want to use my master as my transaction server and my slave as my reporting server. In that respect, I'd like to use very few indexes on my master

Re: How can I Sort by Relevance?

2002-03-27 Thread Jeff Kilbride
Just an aside, the like comparison is case insensitive -- so you don't need the UCASE in this example. like '%A%' will match both A and a. --jeff - Original Message - From: Walter D. Funk [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 27, 2002 10:05 AM Subject: How can

Re: Update change values in wrong column

2002-03-25 Thread Jeff Kilbride
Actually, the column you're referring to is a TIMESTAMP. As the manual states, the first TIMESTAMP field in any table is automatically updated whenever a change occurs. If you don't want this value to change, you should use a DATETIME field instead. However, keep in mind that you'll have to

Re: Getting Found Count When Using Limit

2002-03-23 Thread Jeff Kilbride
Interesting comment in the manual, though, where someone says they tried both methods and found the multiple statements to be faster than SQL_CALC_FOUND_ROWS. --jeff - Original Message - From: Roger Baklund [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: Fletcher Sandbeck [EMAIL PROTECTED]

Re: INSERT ... SELECT not supported?

2002-03-19 Thread Jeff Kilbride
UPDATE sequence_table SET sequence = LAST_INSERT_ID(sequence + 1) Further calls to LAST_INSERT_ID on the same connection will return the value sequence + 1. It's connection specific, so multiple connections can update your sequence table without interfering with each other. There's a great

Re: About to pull my hair out :o) setting up Connection to MySQL

2002-03-09 Thread Jeff Kilbride
Hi Theresa, Your MySQL installation is most likely on the same box. Have you tried localhost as the hostname in the connection string? If that doesn't work, do you have shell access to this machine? If so, you can also look inside the phpMyAdmin directory for a file called config.inc.php. This

SQL question -- can this be done?

2002-03-09 Thread Jeff Kilbride
I have a table with 3 fields: initDate datetime not null id int unsigned not null ipAddress int unsigned not null I'm trying to find the number of distinct ipAddresses associated with a particular id over a specified time frame -- for simplicity, let's say the time frame is the last 60 minutes.

Re: SQL question -- can this be done? FOUND IT!

2002-03-09 Thread Jeff Kilbride
, --jeff - Original Message - From: Jeff Kilbride [EMAIL PROTECTED] To: MySQL [EMAIL PROTECTED] Sent: Saturday, March 09, 2002 1:16 PM Subject: SQL question -- can this be done? I have a table with 3 fields: initDate datetime not null id int unsigned not null ipAddress int unsigned

Re: SQL question -- can this be done?

2002-03-09 Thread Jeff Kilbride
Thanks, Rob. Yeah, I just figured it out myself. I think I convinced myself that it couldn't be that easy! --jeff - Original Message - From: Rob [EMAIL PROTECTED] To: Jeff Kilbride [EMAIL PROTECTED]; MySQL [EMAIL PROTECTED] Sent: Saturday, March 09, 2002 1:26 PM Subject: Re: SQL

Re: [Mysql] Sorry for the reply.

2002-03-07 Thread Jeff Kilbride
The list has an automatic filter that blocks any message that doesn't contain either sql or query in it. Pain in the butt sometimes -- that's why you'll see sql query at the bottom of a lot of people's emails, or in their signature. --jeff - Original Message - From: Chuck PUP Payne

Re: Re: [ANN] Blue World Announces Lasso vs. PHP White Paper

2002-03-07 Thread Jeff Kilbride
Ok, now *that's* funny!! :o) Guess Blue World's dev team haven't read the White Paper... --jeff - Original Message - From: James Cox [EMAIL PROTECTED] To: Mysql [EMAIL PROTECTED] Sent: Thursday, March 07, 2002 3:45 PM Subject: FW: Re: [ANN] Blue World Announces Lasso vs. PHP White

Re: Boolean operators doesnt work in fulltext searched (4.0.1)

2002-03-04 Thread Jeff Kilbride
You need to add the 'IN BOOLEAN MODE' modifier. Try: SELECT * FROM articles WHERE MATCH (title,body) AGAINST ('+database +tutorial' IN BOOLEAN MODE); and SELECT * FROM articles WHERE MATCH (title,body) AGAINST ('+database -tutorial' IN BOOLEAN MODE); --jeff - Original Message - From:

Re: Query structure puzzle

2002-03-02 Thread Jeff Kilbride
If your condition that the status field only contains two values holds true, then there should be no difference in the two queries you have below -- that I can see, unless someone can prove me blind... Are you *absolutely* sure none of the columns contain extra spaces, nulls, etc...? You might

Re: 2 seperate mysql-servers cooperate???

2002-03-02 Thread Jeff Kilbride
It's probably easier to resync the whole database to the laptop, than try to do two-way updates -- unless it's very hard to copy the datafiles from the central database. You can use the binary logging facility of MySQL to keep track of changes on the laptop and then update those changes to the

Re: mysql.sock

2002-03-02 Thread Jeff Kilbride
First of all, are you sure MySQL is running? The mysql.sock file only appears when the server is running. Run the following command on the command line to make sure: ps awx | grep mysqld You should see one line with safe_mysqld in it, and at least a few lines with mysqld in them. If not, you

Re: InnoDB frightens me...

2002-03-02 Thread Jeff Kilbride
... I may have posted the same question here, earlier. I'd appreciate any input. Thanks, --jeff - Original Message - From: Jeremy Zawodny [EMAIL PROTECTED] To: Jeff Kilbride [EMAIL PROTECTED] Cc: MySQL [EMAIL PROTECTED] Sent: Saturday, March 02, 2002 7:11 PM Subject: Re: InnoDB

Re: Lookup tables and indexing

2002-03-02 Thread Jeff Kilbride
Actually, I've been looking pretty closely at a couple of other tables I wanted to implement as HEAP tables -- and I didn't even think about moving my little lookup tables into HEAP. :) Thanks! --jeff - Original Message - From: Jeremy Zawodny [EMAIL PROTECTED] To: Jeff Kilbride [EMAIL

Re: Query structure puzzle

2002-03-02 Thread Jeff Kilbride
Have you tried running these from the command line mysql client, to see what may be up? Maybe you have a variable in your code that's not getting re-initialized properly. If you get the same results from the mysql client, it might be time to run myisamchk on your table. (or just dump the data,

Re: mysql.sock

2002-03-02 Thread Jeff Kilbride
If your server's not running, there won't be a mysql.sock file. It's created when the server starts and disappears when the server stops. It's not really a file in the regular sense -- it's a unix socket. So, the server does not need it to start, it creates it and all the other command line

Re: Re-baselining replication slaves?

2002-03-02 Thread Jeff Kilbride
it anywhere. It seems like this combination would be the best of both worlds. Am I missing something? Thanks, --jeff - Original Message - From: Jeremy Zawodny [EMAIL PROTECTED] To: Jeff Kilbride [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, March 02, 2002 8:29 PM Subject: Re: Re

Re: Re-baselining replication slaves?

2002-03-02 Thread Jeff Kilbride
PROTECTED] To: Jeff Kilbride [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, March 02, 2002 10:03 PM Subject: Re: Re-baselining replication slaves? On Sat, Mar 02, 2002 at 09:51:12PM -0800, Jeff Kilbride wrote: If you cover stuff like this in your book, I'll definitely buy it. :) Now

Re: Re-baselining replication slaves?

2002-03-01 Thread Jeff Kilbride
Hi Jeremy, Just out of curiosity, what kind of tables are you using on your production system? MyISAM, InnoDB, a mix of the two, etc... Thanks, --jeff - Original Message - From: Jeremy Zawodny [EMAIL PROTECTED] To: Guy Davis [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, March

Re: Re-baselining replication slaves?

2002-03-01 Thread Jeff Kilbride
signature, so I'm picking your brain! :) - Original Message - From: Jeremy Zawodny [EMAIL PROTECTED] To: Jeff Kilbride [EMAIL PROTECTED] Cc: MySQL [EMAIL PROTECTED] Sent: Friday, March 01, 2002 2:15 PM Subject: Re: Re-baselining replication slaves? On Fri, Mar 01, 2002 at 01:21:52PM

Re: Emulating a sequence in MySQL?

2002-03-01 Thread Jeff Kilbride
Yep. Check out the last_insert_id function that takes an argument: create table sequence (id int not null); insert into sequence values (0); update sequence set id=last_insert_id(id+1); select last_insert_id(); Repeat the last 2 lines a few times and you'll see that last_insert_id() returns the

Re: Lookup tables and indexing

2002-02-28 Thread Jeff Kilbride
Hi Egor, Thanks for the reply. Does it actually hurt to index them on lower volumes of traffic? Or is it neglible? --jeff - Original Message - From: Egor Egorov [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 28, 2002 8:40 AM Subject: Lookup tables and indexing

Re: flexible foreign keys?

2002-02-28 Thread Jeff Kilbride
that are currently valid. On Wednesday, February 27, 2002, at 07:31 PM, Jeff Kilbride wrote: Why not put a flag variable (tinyint or enum) in your ABA table and instead of deleting the records, just mark them as no longer valid? --jeff - Original Message - From: David Felio [EMAIL

Re: flexible foreign keys?

2002-02-27 Thread Jeff Kilbride
InnoDB doesn't support the CASCADE functionality of foreign keys, so it's possible deleting the key from the parent table won't have any effect on existing transactions in the child. It may only prevent new records from being inserted with that key -- which is essentially what you want. Most DBs

Re: flexible foreign keys?

2002-02-27 Thread Jeff Kilbride
27, 2002, at 01:37 PM, Jeff Kilbride wrote: InnoDB doesn't support the CASCADE functionality of foreign keys, so it's possible deleting the key from the parent table won't have any effect on existing transactions in the child. It may only prevent new records from being inserted

Lookup tables and indexing

2002-02-27 Thread Jeff Kilbride
Is there a rule of thumb for small tables and whether they should be indexed? I have several small, two column lookup tables with few rows (100-300) and some very small tables ( 10 rows). I don't plan on indexing the very small ones, but what about the others? Thanks, --jeff sql,query

Re: Help Optimizing a multi-word search

2002-02-26 Thread Jeff Kilbride
Why don't my replies go to the list, instead of the person posting the message? Is this the way it's supposed to be on this list? Here's one I sent earlier that didn't make it to the list... - I'm going to be implementing a keyword search pretty soon myself, so

Re: any way to do this with SQL ???

2002-02-25 Thread Jeff Kilbride
Sure. Use ALTER TABLE to change the structure of your table and add the datetime field: http://www.mysql.com/doc/A/L/ALTER_TABLE.html Then, use something like: UPDATE myTable SET [datetime field] = [timestamp field]; Keep in mind that this will automatically update all the timestamp fields to

Re: help with big table search

2002-02-24 Thread Jeff Kilbride
I'm about to try a full text index in a very similar situation, which has the potential to grow fairly big. I'd also be interested in hearing how MySQL's full text index works for your large dataset. Thanks, --jeff - Original Message - From: Luke Muszkiewicz [EMAIL PROTECTED] To: [EMAIL

GRANT and overhead

2002-02-22 Thread Jeff Kilbride
What does this quote from the manual mean: If you do not have any GRANT statements done, MySQL will optimise the permission checking somewhat. So if you have a very high volume it may be worth the time to avoid grants. Otherwise more permission check results in a larger overhead. By not having

Indexing question...

2002-02-22 Thread Jeff Kilbride
Hi All, Let's say I'm creating an affiliate program to track surfer clicks to sales. I have a question on indexing that's always bothered me. I'm hoping an index guru can help me out. Here's an example click-recording table: CREATE TABLE clicks ( clickID int unsigned NOT NULL auto_increment,

Different indexes on slave -- replication

2002-02-22 Thread Jeff Kilbride
Can I have different indexes on the tables in my master and slave? I want to use the slave strictly for reporting and the master for inserts, so I'd like to index the crap out of the slave and leave the master relatively index free. Will that work? Thanks, --jeff P.S. -- how 'bout adding some

Fw: Script for database creation

2002-02-22 Thread Jeff Kilbride
mysql your_script.sql or cat your_script.sql | mysql This assumes you have your username and password set up in your my.cnf or .my.cnf (home directory). If not, add the -u[username] -p[password] switches. --jeff - Original Message - From: Chetan Lavti [EMAIL PROTECTED] To: [EMAIL

ERD for MySQL?

2002-02-21 Thread Jeff Kilbride
Are there any open source ERD programs for MySQL for doing basic data modelling? I tried myERD at sourceforge and it couldn't parse the sql dump from my database. It died with a parse exception on the unsigned attribute for my int columns. Any other choices out there? Thanks, --jeff

Wide Indexes

2002-02-21 Thread Jeff Kilbride
For reporting purposes, I usually use a wide index across all the fields that are relevant to creating the reports. So, for example, my sales table has this type of data: sale_id sale_date salesperson_id product_id referral_id [other sales data] sale_id is an auto_incrementing primary key.

Re: Wide Indexes

2002-02-21 Thread Jeff Kilbride
or not? Thanks, --jeff - Original Message - From: Jeremy Zawodny [EMAIL PROTECTED] To: Jeff Kilbride [EMAIL PROTECTED] Cc: MySQL [EMAIL PROTECTED] Sent: Thursday, February 21, 2002 11:19 PM Subject: Re: Wide Indexes On Thu, Feb 21, 2002 at 08:13:51PM -0800, Jeff Kilbride wrote: For reporting

  1   2   >