RE: How many colums should a index contain?

2006-11-03 Thread Andy Eastham
John, Things to consider are that only one index can be used in a query, and it's what's in your where clause that's important. Therefore, your search (where bid = ...) will only use an index that has bid as the first column in it. Therefore your multicolumn index wouldn't be used, as id is the

RE: Reply / Return Address of this List

2006-04-18 Thread Andy Eastham
Yes this battle has been fought before. But this is still a pain in the ass. Whilst the list is unmoderated, surely someone at MySQL has the capacity to make a change to the server configuration of whatever hosts the list? How many times has someone had their problem solved by someone who

RE: Reply / Return Address of this List

2006-04-18 Thread Andy Eastham
Ok, As expected, multiple flames were sent in my direction for suggesting that this list should behave in the way that a logical person would expect it to. I accept that this was probably done for a reason, and that other lists work this way (though I've never seen one), so maybe I'd feel better

RE: query help?

2006-02-23 Thread Andy Eastham
Richard, If you mean with _both_ the same id _and_ vendor id, try this: Select id, vendor_id, count(*) from tablename group by id, vendor_id; If you just want separate counts for id and vendor_id, use: Select id, count(*) from tablename group by id; Select vendor_id, count(*) from tablename

RE: Geographical advice

2006-01-10 Thread Andy Eastham
James is right. I use this method on a table with a combined index on 50 million rows and it's almost instantaneous. Performance was vastly improved after I did an alter table order by x Andy -Original Message- From: James Harvard [mailto:[EMAIL PROTECTED] Sent: 10 January 2006

RE: working w/UK postcodes

2006-01-09 Thread Andy Eastham
Hi, There is a database available which maps post codes to grid references. This is controlled by the Royal Mail. See http://www.royalmail.com/portal/rm/jump2?mediaId=400088catId=400084 This may also be interesting: http://www.jibble.org/ukpostcodes/ In case you don't know, UK post codes

RE: Performance problem

2005-09-29 Thread Andy Eastham
Marco, Traurig - ich habe das googleübersetzungshilfsmittel benutzt, um zu versuchen, Ihnen zu helfen. Bevor Sie Benutzerprioritäten betrachten, schlage ich Sie Blick an vor, wie Ihre Daten registriert werden. Mysql verwendet nur einen Index pro Frage, also muß Ihre Tabelle einen Index auf

RE: Fulltext behavior in 3.23.58

2005-09-22 Thread Andy Eastham
Nitzan, In the unlikely event that you can recompile but not upgrade, you could add your common words to the full text stopword list in myisam/ft_static.c and rebuild mysql. Otherwise, this might be helpful http://lists.mysql.com/mysql/132649 Andy -Original Message- From: nitzan

RE: Startup Error

2005-09-20 Thread Andy Eastham
into this? Andy _ From: Johnson, Richard (NY Int) [mailto:[EMAIL PROTECTED] Sent: 20 September 2005 12:00 To: 'Andy Eastham' Subject: RE: Startup Error [EMAIL PROTECTED] mysql]# ls -l /usr/local/mysql lrwxrwxrwx1 root root 40 Sep 19 09:00 /usr/local/mysql

RE: SATA vs SCSI

2005-05-12 Thread Andy Eastham
Brent, I'd disagree with your felling that today's disk drives are more reliable than dive years ago. I used to think of disk failures as a rare event, but now that they are producing such high capacity parts for next to nothing, I think quality has suffered. I've heard of a lot more people

RE: Remove 1st 3 Chars

2005-05-11 Thread Andy Eastham
Andrew, I think you'll get what you want if you add order by fieldname desc on the end of your query, but that's only because the order you have specified happens to be in reverse ascii order. Andy -Original Message- From: Andrew Braithwaite [mailto:[EMAIL PROTECTED] Sent: 11 May

RE: EXPLAIN: Select tables optimized away

2005-02-17 Thread Andy Eastham
Gabriel, I think it means that this count can be done from an index, so there's no need to access the actual table at all. Andy -Original Message- From: Gabriel PREDA [mailto:[EMAIL PROTECTED] Sent: 17 February 2005 11:16 To: mysql@lists.mysql.com Subject: EXPLAIN: Select tables

RE: Undo function?

2005-01-20 Thread Andy Eastham
Backups are good too :-) Andy -Original Message- From: Artem Koltsov [mailto:[EMAIL PROTECTED] Sent: 20 January 2005 15:06 To: mysql@lists.mysql.com Subject: RE: Undo function? Hello, If you define table type as InnoDB, you can use transactions (see the link below). You will

RE: sub query is extermely slow

2005-01-19 Thread Andy Eastham
I think it might also be better to remove the function date(tt.date) if possible ie change date(tt.date) = 2005-01-31 to tt.date = correct date format This will remove the function on the tt table field which I believe will force a full table scan on what is probably the largest table? Andy

RE: Retrieving partial field values

2005-01-06 Thread Andy Eastham
Hi, Full text search should be fine with 8 million records. These are short records too, so there shouldn't be any problem at all. Also, you can configure the minimum word length in the my.cnf file, so if you want it to find short words, you can. I've got it set to two in one of my

RE: Restart of Mysql and tomcat error

2004-12-15 Thread Andy Eastham
Johanne, There are numerous questions about connection methods, pooling etc that would be better asked in the tomcat list and would require work in your web application. However, putting on my pragmatic system integrator hat, could you get round this by simply doing a request to your application

RE: Excel 2 mysql

2004-12-08 Thread Andy Eastham
David, In the load data infile command you can specify the delimiter character (see manual). It is a comma in CSV files, but I think it defaults to the TAB character in load data infile. You can specify the delimiter to be comma in the load command. However, I prefer to export from Excel as

RE: Queries taking 60 seconds+

2004-11-11 Thread Andy Eastham
John, Have you got a single multi-column index on countyid, price and old, or do you have individual indexes on each of these fields? The former would be much better. Andy -Original Message- From: John Smith [mailto:[EMAIL PROTECTED] Sent: 11 November 2004 14:15 To: Victor

RE: Referring to columns by ordinal

2004-10-07 Thread Andy Eastham
The programming solution is work out the column name in your script, ie do describe tablename in your script, look for the column name marked as PRI in the key column, then insert this column name in the select statement. Andy -Original Message- From: Rhino [mailto:[EMAIL PROTECTED]

RE: Working with 160M entries table

2004-09-23 Thread Andy Eastham
Ricardo, The best performance solution is to create another column to contain (time_utc-1004127737) div 86400 Update the table to set this value correctly for every row, then calculate the value for this column every time you insert more data. Create an index on prefix and the new column and

RE: How can I avoid warm-up time?

2004-09-10 Thread Andy Eastham
Tamar, The only way to fill the caches up is to execute queries. If there is a delay between your server coming up and the application being used, try executing the queries that your application will use from a start-up script (you'll need to work these out carefully. This way the caches will

RE: problems counting the number of returned rows

2004-09-07 Thread Andy Eastham
Arthur, Is it faster if you do: select SQL_CALC_FOUND_ROWS category use index(category) from books where category=1 limit 0,10 ie change * to category (which can be read from the index)? Andy -Original Message- From: Arthur Radulescu [mailto:[EMAIL PROTECTED] Sent: 07 September

RE: problems counting the number of returned rows

2004-09-07 Thread Andy Eastham
[mailto:[EMAIL PROTECTED] Sent: 07 September 2004 15:03 To: Andy Eastham; Mysql List Subject: Re: problems counting the number of returned rows Thanks for the tip! It is much faster now... But it still takes about 3 seconds which makes about the same thing like using count() so this still

RE: INSERT SELECT

2004-07-07 Thread Andy Eastham
Shaun, You need two columns for the insert, but you're only selecting one. Try this: INSERT INTO Letter_Templates (Work_Type_ID, Project_ID) SELECT Work_Types.Work_Type_ID, Work_Types.Project_ID FROM Work_Types WHERE Work_Types.Project_ID = 'x'; Andy -Original Message- From: shaun

RE: RE - Order By Problem

2004-06-08 Thread Andy Eastham
Look at using the Reverse() function, then take the substring up to the first space, then reverse the result. Andy -Original Message- From: Paul McNeil [mailto:[EMAIL PROTECTED] Sent: 08 June 2004 14:04 To: [EMAIL PROTECTED] Subject: RE - Order By Problem I have never done

RE: RE - Order By Problem

2004-06-08 Thread Andy Eastham
Andy, Just: select substring_index(surname,' ',-1) as r from advisers order by r; works. Andy -Original Message- From: andy thomas [mailto:[EMAIL PROTECTED] Sent: 08 June 2004 15:57 To: Andy Eastham Cc: Mysql List Subject: RE: RE - Order By Problem On Tue, 8 Jun 2004, Andy

RE: BETWEEN

2004-04-20 Thread Andy Eastham
Max, You can measure the elapsed time by writing a linux shell script to do the inserts, then use the linux time command to run it. However, the user and system times displayed will not include the amount of cpu time used by the db server. Do it a few times and vary the number of inserts to

RE: How do I determine the row number or key when table has no key fields

2004-04-02 Thread Andy Eastham
Ross, You'll need to do an order by on both columns (so you'll need to index both columns in a compound index), then use the LIMIT keyword which is designed for exactly this job. Alternatively, unload the data using mysqldump, then edit the table definition to have an autoincrement column, then

RE: How do I determine the row number or key when table has no keyfields

2004-04-02 Thread Andy Eastham
, 2004-04-02 at 14:05, Andy Eastham wrote: Ross, You'll need to do an order by on both columns (so you'll need to index both columns in a compound index), then use the LIMIT keyword which is designed for exactly this job. Alternatively, unload the data using mysqldump, then edit the table

RE: Searching for matching zipcode in a list of (ranges of) zipcodes

2004-01-14 Thread Andy Eastham
Tom, Change your database so that you have an engineer table and an engineer_zipcodes table. Each engineer can have multiple entries in the engineer_zipcodes table. Engineer Engineer_id integer auto_increment primary key Name Address Etc Create index engineer1 on engineer(engineer_id)

RE: MySQL as document storage?

2004-01-08 Thread Andy Eastham
Steve, I know you've been pointed at an interesting resource, and others are saying they've done this successfully, but I think you should get some balance. I've worked in document management for years, and I think it's a very bad idea. Have you ever had to restore a system from loads of

RE: Security Question

2003-11-27 Thread Andy Eastham
Thomas, It would be more secure if you has the DB on another server that was locked down and only allowed access to the web server on the MySql port, (plus probably ssh access for admin). If you're going to the expense of audits, this must be fairly important, so the cost of the other server

RE: Index before or after inserts?

2003-11-27 Thread Andy Eastham
Mirza, Definitely, index after insert. Andy -Original Message- From: Mirza [mailto:[EMAIL PROTECTED] Sent: 27 November 2003 15:33 To: [EMAIL PROTECTED] Subject: Index before or after inserts? I need to insert hundreds of milions of records to a table and make several

RE: DB design question

2003-11-21 Thread Andy Eastham
Julian, Your design is sound in my opinion. An area you probably need to consider is when you need to search across a day boundary. You will need to make the application aware that it needs to search across a day boundary, so that it searches two tables with a union where necessary. It will

RE: SQL query question

2003-11-11 Thread Andy Eastham
Pael, Try this: SELECT firmal.beskrivelse as Businessline, lokasjon.navn as Location, count(person.[uniqueid]) FROM firmal INNER JOIN ( person INNER JOIN lokasjon ON person.lokid = lokasjon.lokid) ON firmal.firmalid = person.firmalid GROUP BY firmal.beskrivelse, lokasjon.navn Replace [uniqueid]

RE: Need ur help ..........

2003-11-07 Thread Andy Eastham
Renuka, Put the file into a location such as /usr/local Gunzip it: gunzip mysqlgui-linux-semi-static-1.7.5.tar.gz Unpack it: tar -xvf mysqlgui-linux-semi-static-1.7.5.tar create a symbolic link from mysql to mysqlgui-linux-semi-static-1.7.5 under /usr/local/ ln -s

RE: MySQL query question

2003-11-07 Thread Andy Eastham
Chris, You're almost there! select * from temp where col2 like concat('%',col1, '%'); Andy -Original Message- From: Chris A. Mattingly [mailto:[EMAIL PROTECTED] Sent: 07 November 2003 17:01 To: [EMAIL PROTECTED] Subject: MySQL query question I've searched around on the lists

RE: Faster Query Method?

2003-10-22 Thread Andy Eastham
Scott, First, you don't mention indexes, - generally you need to make sure you've got the right indexes. Each table should have an index that contains every field in the where clause. Second, searching for %x% is always slow as this search can't use indexes (search for x% can though). As it

FW: SELECT 9 BETWEEN 1 AND 0

2003-10-21 Thread Andy Eastham
This went direct and not to the list. Andy -Original Message- From: Andy Eastham [mailto:[EMAIL PROTECTED] Sent: 21 October 2003 08:19 To: Steven Ducat Subject: RE: SELECT 9 BETWEEN 1 AND 0 Steve, I'd add an extra column with modified code in it, where I subtracted 1 from the number

RE: [mysql] MYSQL

2003-10-10 Thread Andy Eastham
Here are some hard examples to help: It is certainly usable on an old PC eg 200MHz Pentium 2 with linux and 32Mb RAM. Obviously the performance will be proportional to the hardware, but MySql is designed to be able to run on low level hardware. If you just want to play around with the database,

RE: printing reports

2003-10-08 Thread Andy Eastham
Please take this flame war off list. -Original Message- From: Wang Feng [mailto:[EMAIL PROTECTED] Sent: 08 October 2003 11:31 To: Michael Haunzwickl; 'Director General: NEFACOMP'; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: printing reports Importance: Low So listen guy,

RE: how to export data from multiple tables

2003-10-07 Thread Andy Eastham
Nitin, Create a temporary table, then select each table into it in turn, then output that to the file? Andy -Original Message- From: Nitin [mailto:[EMAIL PROTECTED] Sent: 07 October 2003 11:40 To: [EMAIL PROTECTED] Subject: how to export data from multiple tables Hi all, I've

RE: Newbye speed question - which setup to use for indexing

2003-10-03 Thread Andy Eastham
Peer, How big are the table and index files? Can your OS handle files bigger than 2/4Gb? I've got a table with 55 million rows with just 3 columns all floats. I've got three indexes with all the fields in various orders. My data file is 700Mb but my index file is over 4Gb, so yours could

RE: GRANT update query: Updating host access entry for users but retaining existing passwords

2003-09-30 Thread Andy Eastham
Shin, I've never tried this, so it's pure speculation, but I believe all of the grant information is contained in a regular table called user. You should be able to copy this information into a temporary table using select into, then perform regular updates to change the host information to

RE: join not using first primay key, per explain

2003-09-22 Thread Andy Eastham
Jeff, Try creating a new index on Question containing just the question_key field, and try it again. Andy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 22 September 2003 13:23 To: [EMAIL PROTECTED] Subject: join not using first primay key, per explain

RE: Do I use Except?

2003-09-19 Thread Andy Eastham
Matt, On most platforms, you would generally do a sub select of the form select playerid from players p where not exists ( select * from myplayers m where m.player_id = p.player_id ) However, as sub selects are only supported in mysql 4.1, you'll need to see section

RE: Platform vs. Performance

2003-09-18 Thread Andy Eastham
Jeremy, I don't think there's a huge difference in WinTel performance and Linux, given the same hardware. Anyway, your application is so lightweight, it's not really going matter very much. Ease of administration for you and your client will be far more important. Andy -Original

RE: Performance Problems

2003-09-18 Thread Andy Eastham
Matthias, Can you send us your table index definitions and the output of an EXPLAIN command on your query? ie DESCRIBE pool; SHOW INDEX FROM pool; EXPLAIN SELECT sendnr FROM pool where sendnr = 111073101180; I'm pretty sure we can improve this - I've got a table with 55 million records (though

RE: Platform vs. Performance

2003-09-18 Thread Andy Eastham
], Andy Eastham [EMAIL PROTECTED] writes: Jeremy, I don't think there's a huge difference in WinTel performance and Linux, given the same hardware. The following URL tells you that there's a big difference between Windoze and Linux: http://www.mysql.com/information/presentations/presentation

RE: Platform vs. Performance

2003-09-18 Thread Andy Eastham
Alec, My point was that in a 40,000 row database, server speed is irrelevant - it's going to be sub second on anything more powerful than my mobile phone. Cost of ownership is much more important for this application, and that depends on the particular circumstances. Andy -Original

RE: Platform vs. Performance

2003-09-18 Thread Andy Eastham
of reality... Andy -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Harald Fuchs Sent: 18 September 2003 17:00 To: [EMAIL PROTECTED] Subject: Re: Platform vs. Performance In article [EMAIL PROTECTED], Andy Eastham [EMAIL PROTECTED] writes: I don't see anything

RE: Blasted #$%$^$^ host has v3.23 when i need UNION

2003-09-15 Thread Andy Eastham
Ryan, As you probably found out, union is only available in version 4 of mysql. As you're using PHP anyway, why don't you just break it up into 5 separate selects and combine the results in PHP? Andy -Original Message- From: Ryan A [mailto:[EMAIL PROTECTED] Sent: 15 September 2003

RE: Blasted #$%$^$^ host has v3.23 when i need UNION

2003-09-15 Thread Andy Eastham
Ryan, If this query worked, it would return you 5 rows, one for each separate count. If you execute 5 separate counts in PHP, you'll get 5 separate values with the same numbers as above. Not radically different? Andy -Original Message- From: Ryan A [mailto:[EMAIL PROTECTED] Sent:

RE: Blasted #$%$^$^ host has v3.23 when i need UNION

2003-09-15 Thread Andy Eastham
Ryan, You might well find that the 5 separate counts are quicker than the join approach. Mysql is pretty efficient at counts on indexed columns from a single table. My instincts suggest that the four table join you are proposing could be slower than the 5 separate counts, especially if the

RE: random record

2003-09-15 Thread Andy Eastham
39? -Original Message- From: tuncay bas [mailto:[EMAIL PROTECTED] Sent: 15 September 2003 13:32 To: mysql Subject: random record hi, why its mysql database over random record use? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

RE: How to generate sql scripts in Mysql?

2003-09-12 Thread Andy Eastham
Florence, Section 3.6 of the manual explains... 3.6 Using mysql in Batch Mode In the previous sections, you used mysql interactively to enter queries and view the results. You can also run mysql in batch mode. To do this, put the commands you want to run in a file, then tell mysql to read its

RE: Query won't use index

2003-09-09 Thread Andy Eastham
Ken, The problem is that you've got a compound index on files which type_id isn't the first item. If you create a new index on files, just on type_id, all will be fine. Mysql would only be able to use a compound index for this query if type_id was the first column in it. Andy -Original

RE: STUMPED: How Can I Pull Related Info Using Subqueries/Joins?

2003-08-14 Thread Andy Eastham
Patrick, You need outer joins to do this. Try searching for outer join sql tutorial on Google. Hope this helps, Andy -Original Message- From: Patrick Crowley [mailto:[EMAIL PROTECTED] Sent: 07 August 2003 16:51 To: [EMAIL PROTECTED] Subject: STUMPED: How Can I Pull Related Info

RE: Problems with spatial extensions

2003-08-05 Thread Andy Eastham
Enrique, Your English is great so don't apologise! Looking on the web site at http://www.mysql.com/doc/en/Spatial_extensions_in_MySQL.html , it appears that this feature was introduced in server version 4.1, so I'm afraid you'll have to upgrade your server. Best regards, Andy -Original

RE: Problem reading my.cnf

2003-08-04 Thread Andy Eastham
Ganbold Because the bug that did not recognise the comment character in the password line has been fixed? Andy -Original Message- From: Ganbold [mailto:[EMAIL PROTECTED] Sent: 04 August 2003 09:51 To: Primaria Falticeni Cc: [EMAIL PROTECTED] Subject: Re: Problem reading my.cnf

RE: my.cnf is not available under windows 2000

2003-08-01 Thread Andy Eastham
Morten , The file used is my.cnf on unix and my.ini on windows. You should only have one file. Andy -Original Message- From: Morten Gulbrandsen [mailto:[EMAIL PROTECTED] Sent: 01 August 2003 14:23 To: [EMAIL PROTECTED] Subject: my.cnf is not available under windows 2000 Hi

RE: Can someone help me??

2003-07-16 Thread Andy Eastham
Try using only single quotes rather than a mixture of single and double quotes? Andy -Original Message- From: Sbandy [mailto:[EMAIL PROTECTED] Sent: 16 July 2003 10:32 To: Rudy Metzger; [EMAIL PROTECTED] Subject: RE: Can someone help me?? I use phpmyadmin At 11.26 16/07/2003

RE: Another Newbie Question

2003-07-15 Thread Andy Eastham
George, Try in the folder with the same name as your database, under the data folder. Andy -Original Message- From: Degan, George E, JR, MGSVC [mailto:[EMAIL PROTECTED] Sent: 15 July 2003 13:30 To: [EMAIL PROTECTED] Subject: Another Newbie Question I am finally able to enter

RE: MySQL vs. PostgreSql -- speed test

2003-07-14 Thread Andy Eastham
When I benchmarked PostgreSql against MySql for my application, MySql was 15 times faster, so 18% wouldn't make much difference for me! Andy -Original Message- From: Robson Oliveira [mailto:[EMAIL PROTECTED] Sent: 14 July 2003 15:35 To: [EMAIL PROTECTED] Subject: Re: MySQL vs.

RE: Can mysql handle this load?

2003-07-09 Thread Andy Eastham
Adam, Mysql will easily handle this. This certainly doesn't constitute a large database. Correctly indexing the database should see you doing speedy queries on years worth of data. Sounds like you've used access in the past :-) Andy -Original Message- From: Adam Gerson

RE: concat() differences between mssql and mysql

2003-07-08 Thread Andy Eastham
Note that trailing spaces are not removed when you insert data into a TEXT (or BLOB for that matter) column. This may be of use to you, but TEXT does have limitations. Andy -Original Message- From: Egor Egorov [mailto:[EMAIL PROTECTED] Sent: 08 July 2003 09:31 To: [EMAIL PROTECTED]

RE: [HELP] Newbie experiences problems AND receives no help for the moment

2003-07-07 Thread Andy Eastham
Matthias, I, like everyone else on the list it appears, have no idea how to help you as you have provided no example of what you are trying to do, no output and no error messages. Remember everyone gives help here for free, so people tend to help people who make it clear what the problem is. I

RE: issue with 'count'

2003-07-07 Thread Andy Eastham
Paul, Try SELECT c.id, count(cug2.id_curso) as num_profe_curso FROM nuke_elearning_curso as c, LEFT JOIN nuke_elearning_curso_usuario_grupo as cug2 ON c.id = cug2.id_curso group by c.id HAVING num_profe_curso 0 Andy -Original Message- From: Paul [mailto:[EMAIL PROTECTED] Sent: 07

RE: Counting question

2003-07-03 Thread Andy Eastham
Try this: select delivery, count(*) as ticketcount from ticketsales where delivery=post or delivery=pickup group by delivery Andy -Original Message- From: Ville Mattila [mailto:[EMAIL PROTECTED] Sent: 03 July 2003 11:28 To: [EMAIL PROTECTED] Subject: Counting question Hi there,

RE: CSV Formated output

2003-07-03 Thread Andy Eastham
Jeff, Use SELECT INTO OUTFILE and FIELDS TERMINATED BY ',' See the manual for more info. Andy -Original Message- From: Jeff McKeon [mailto:[EMAIL PROTECTED] Sent: 03 July 2003 12:38 To: [EMAIL PROTECTED] Subject: CSV Formated output Is there a way to output the results of a

RE: CSV Formated output

2003-07-03 Thread Andy Eastham
McKeon [mailto:[EMAIL PROTECTED] Sent: 03 July 2003 13:50 To: Andy Eastham; Mysql List Subject: RE: CSV Formated output Thanks Andy, that will do! I don't have a manual, using the open source MySQL. I do have a book (New Riders MySQL) but was looking for deliminated not terminated. Found

RE: sum() problems

2003-06-26 Thread Andy Eastham
Pat, I think it might be caused by the fact that you are grouping by a column that isn't being selected - ordini.numordine is not in the select part. Andy -Original Message- From: PaT! [mailto:[EMAIL PROTECTED] Sent: 26 June 2003 12:50 To: [EMAIL PROTECTED] Subject: sum() problems

RE: search and replace.

2003-06-20 Thread Andy Eastham
Try something like this: UPDATE tablename SET url = concat(programs, substring(url,12)) where url like (disciplines/%); Andy -Original Message- From: Craig Harding [mailto:[EMAIL PROTECTED] Sent: 20 June 2003 17:31 To: [EMAIL PROTECTED] Subject: search and replace. Is there is

RE: probably a stupid question

2003-06-18 Thread Andy Eastham
Jonas, After the insert, execute SELECT LAST_INSERT_ID(); This always gives the last auto increment value generated by your database connection. Andy -Original Message- From: Jonas Geiregat [mailto:[EMAIL PROTECTED] Sent: 18 June 2003 19:26 To: 'Mysql' Subject: probably a stupid

RE: question?

2003-06-16 Thread Andy Eastham
Jerry, Try this link: http://www.phpbuilder.com/columns/moon19990716.php3 Andy -Original Message- From: JeRRy [mailto:[EMAIL PROTECTED] Sent: 16 June 2003 14:35 To: [EMAIL PROTECTED] Subject: question? Hi, I want to run my php scripts, mysql from home. Now after being

RE: Getting the last entered row from a relational table

2003-06-06 Thread Andy Eastham
Try: select * from comments where (place_holder id) = (id in main table) order by id desc LIMIT 1 Andy -Original Message- From: Petre Agenbag [mailto:[EMAIL PROTECTED] Sent: 05 June 2003 11:05 To: [EMAIL PROTECTED] Subject: Getting the last entered row from a relational table

RE: full text searching question

2003-06-04 Thread Andy Eastham
Chris, You're nearly there - the way to do it is: SELECT first_name,last_name,MATCH(first_name,last_name) AGAINST ('+wilkinson* chris*' IN BOOLEAN MODE) AS score FROM names_table WHERE MATCH(first_name,last_name) AGAINST ('+wilkinson* chris*' IN BOOLEAN MODE) ORDER BY score DESC; The db engine

RE: full text searching question

2003-06-04 Thread Andy Eastham
Chris, I should have added that the explanation is that the full text query does not automatically sort on the score when boolean mode is selected. Andy -Original Message- From: Chris Wilkinson [mailto:[EMAIL PROTECTED] Sent: 03 June 2003 13:12 To: [EMAIL PROTECTED] Subject: full

RE: password not working from command line

2003-04-01 Thread Andy Eastham
Eldon, Make sure you don't enter a space between -u and the username and -p and the password ie mysql -uuser -ppassword Andy -Original Message- From: Eldon Ziegler [mailto:[EMAIL PROTECTED] Sent: 01 April 2003 16:15 To: [EMAIL PROTECTED] Subject: password not working from command

RE: Opposite of DISTINCT()

2003-04-01 Thread Andy Eastham
Bob, You have to do a self join - try this off the top of my head... - Select p1.email FROM tblperson p1, tblperson p2 WHERE p1.email = p2.email GROUP BY p1.email HAVING count(p1.email) 1 Andy -Original Message- From: Bob Sawyer [mailto:[EMAIL PROTECTED] Sent: 01 April 2003 21:04

RE: UPDATE syntax help

2003-03-12 Thread Andy Eastham
Paul, You have to use the results of one select to generate lots of update statements. If you execute all these from your program, make sure you use a different database connection for the updates, if you're keeping a results set open. Alternatively, if it's a one off, generate a script file

RE: What to Download?

2003-03-03 Thread Andy Eastham
Jeremy, If you just want to use the server and connect to it to perform queries and maintain it, just the server and clients should suffice. If you want to link your own C programs against mysql or measure the exact performance on your hardware, you may want the others. By the fact that you're

RE: Recursion

2003-02-12 Thread Andy Eastham
Rob, This is a common problem in document management, where I have a reasonable amount of experience. Unfortunately, the short answer is, that to be completely generic, efficient and elegant, it's a bit of an impossible problem. What we have always done in this situation is to maintain an

RE: Recursion

2003-02-12 Thread Andy Eastham
Amer, It's still worth storing the parentId, because you can easily recreate the fullpath if (when!) your code screws up a set of full paths. You can also write a reliable sanity checker that checks the full path of all the nodes in the table based on the parentids. Also, to locate multiple

RE: Very slow request with many ORs in where parts

2003-02-11 Thread Andy Eastham
Artem, Have you considered using a full text index? I don't really understand exactly what you are trying to do, but consider it if you haven't already. Andy -Original Message- From: Artem Koutchine [mailto:[EMAIL PROTECTED]] Sent: 11 February 2003 14:23 To: [EMAIL PROTECTED]

RE: [ gamma file ]

2003-01-16 Thread Andy Eastham
It's the next step after beta - ie it's release quality, but hasn't been in release that long. Therefore it's probably not been deployed in production by that many people. Bear in mind that even alpha versions have undergone and completely passed the full set of regression tests. After a period

RE: Need help with UNION

2003-01-16 Thread Andy Eastham
Garry, You are using mysql version 4? Unions are only supported in version 4. If so, the only difference I can see from your example to the manual is that each select is in brackets in the manual. Try the query: (select cnumber from spouse where fd_status = A) union (select cnumber from

RE: Solaris Performance

2003-01-14 Thread Andy Eastham
Eastham Cc: [EMAIL PROTECTED] Subject: Re: Solaris Performance On Mon, Jan 13, 2003 at 03:34:29PM -, Andy Eastham wrote: I've got a mysql application that was developed on win32 and linux that is now going to be deployed on a Sun E250 Solaris 9 box with 3 36Gb non raided SCSI disks

Solaris Performance

2003-01-13 Thread Andy Eastham
Hi, I've got a mysql application that was developed on win32 and linux that is now going to be deployed on a Sun E250 Solaris 9 box with 3 36Gb non raided SCSI disks. No problem I thought - the performance is fine on my PIII 850MHz laptop, so it will rock on an E250... Not the case - the laptop

Solaris Performance

2003-01-13 Thread Andy Eastham
Hi, I've got a mysql application that was developed on win32 and linux that is now going to be deployed on a Sun E250 Solaris 9 box with 3 36Gb non raided SCSI disks. No problem I thought - the performance is fine on my PIII 850MHz laptop, so it will rock on an E250... Not the case - the laptop

RE: Solaris Performance

2003-01-13 Thread Andy Eastham
Simon, Thanks, for the reply. I guess I better try the 64 bit version and see if it makes a difference. I'll report back what I find. Cheers, Andy -Original Message- From: Simon Green [mailto:[EMAIL PROTECTED]] Sent: 13 January 2003 16:58 To: 'Andy Eastham'; [EMAIL PROTECTED

RE: converting from foxpro to mysql ???????

2002-11-28 Thread Andy Eastham
I do speak English natively, and I haven't a clue what you're talking about either. Andy mysql query -Original Message- From: Tonu Samuel [mailto:[EMAIL PROTECTED]] Sent: 28 November 2002 09:48 To: toby z Cc: [EMAIL PROTECTED] Subject: Re: converting from foxpro to mysql ???

RE: Application level security

2002-11-28 Thread Andy Eastham
Noel, I'm sorry if this is obvious, but have you considered putting a firewall in the way? If your application is on the same machine as the database, block all connections except to the port your application runs on (ie probably 80 if it's a web application)? The firewall will block

RE: Mysql Encryption

2002-11-18 Thread Andy Eastham
Don't forget that SSH (eg OpenSSH) can tunnel regular port connections too. This is dead easy to set up with a client such as SecureCRT from Van Dyke, but this is a paid product (although worth the money in my opinion - I own it). They also do Entunnel which is cheaper product which just does

RE: Newbie: Intersecting entities

2002-11-07 Thread Andy Eastham
John, You're making sense. If you wanted to find all the systems used on project Test Bed Alpa, you'd do something like this: Select sys_name, s.id, project_name FROM systems s, new_req n,ie_sys_req i WHERE s.id = i.sys_id AND n.id = i.proj_name_id AND n.id = 344; Hope this helps, Andy mysql

RE: select using regexp

2002-11-04 Thread Andy Eastham
Mark, It looks like you should be using full-text indexes and the match and against functions to me. Check out section 6.8 in the manual. Andy mysql query -Original Message- From: Mark Goodge [mailto:mark;good-stuff.co.uk] Sent: 04 November 2002 11:21 To: [EMAIL PROTECTED]