Re: faster update
On Thursday 06 June 2002 9:51 am, Greg D. wrote: I was wondering if there was a better way to speed up my update statement in my perl script. It goes through all the entries in the database , which is around 800, 000, and then updates the email field. The problem is that it takes to long. thanks in advance for any help here the code: open(A, $ktjpath/$ktjlist) || death(Can't open $ktjlist: um121); my $sql_statement = UPDATE ktj SET ktjnews = 'N' WHERE email = ?; my $sth = $dbh-prepare($sql_statement) || die Error1 preparing update statement on track:\n . $dbh-errstr; while (A){ print $_\n; $sth-execute($_) || die Error2 executing update statement on track:\n . $sth-errstr; } close A; Please note: If you are using this to maintain a list of emails that you will send spam to (an 'opt-in' mailing list does NOT count but an 'opt-out' does), you may not read any further in this message and may not use any advice I give. :) Are you indexing on email? If not, you should be. That should reduce this from a table scan to an index scan provided that the emails are mostly unique. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL or MS Access ?
On Wednesday 05 June 2002 4:28 pm, Jay Liew wrote: Hello everyone, I am new to database operations, and I was wondering if there were any advantages or using MS Access to MySQL. Don't get me wrong, but I would prefer Open Source over proprietary, but this is a mission-critical commercial purpose database. Any comments, would be much appreciated. Thank you. MS Access has a graphical front-end and a graphical development environment. You have to get these separately in MySQL. Apart from that, there is nothing that Access does better than MySQL and a _lot_ that MySQL does better (multiple simultaneous users, stability, etc. etc.) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL or MS Access ?
On Wednesday 05 June 2002 4:54 pm, Jeremy P. McKay wrote: I do not really think MS Access is for Mission-Critical databases...but I guess that depends on ther definition of mission critical. Most MCP will agree that MS Access does not scale well and offers little advantages for Mission-Critical Enterprise Class Solutions. Now, If you were comparing MS SQL Server to MySQLmaybe, MS Access scales reasonably well up to one simultaneous user. After that, literally all bets are off (and it _shouldn't_ work, it is like that by design). MS Access is designed to be used for small databases such as your own CD collection or something similar. It does this job quite well, probably better than MySQL does. But that's all. MS Access should not be used for anything much bigger. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Message
Please stop reposting your question. You should be able to get this information from Delphi. Set up a time object before you execute the query. On Thursday 16 May 2002 10:19 am, Alexander Burbello wrote: I made a program with delphi and I would like to get the message when is execute any query. eg: select ... 10 rows in set (0.04 sec) . This message is important for me. How can I get it. Alexander A busca mais veloz e precisa da internet. Acesse agora: http://www.zoom.com.br. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: table structure question
On Monday 13 May 2002 1:49 pm, Taylor Lewick wrote: Hi All, I am fairly new to mysql.. I am using perl, mysql, and apache to do a little development, and to learn quickly I am trying to do some real dbase transactions... I have a program whcih gets a bunch of stock quotes from the internet (say about 5000) it returns symbol, price, time, etc (about 10 columns) What would eb the best way to organize a table or tables if I wanted to store about a month or twos worth of data.. Just store 1 big table with name as primary key and data as a unique value, or is there a better way to store large amounts of similar records... Read up on database normalisation. I'd recommend splitting it up into at least two tables, one containing stock information regardless of time and the other containing a specific quote. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: add column to table mysql
Look up the ALTER TABLE statement. On Friday 10 May 2002 12:52 pm, Tang Ngo wrote: I am beginning to learn mysql. How to add a column to table in mysql database. Thanks Tang - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: LAST_INSERT_ID()
On Tuesday 23 April 2002 1:10 pm, destr0 wrote: query, table When I run the query: SELECT LAST_INSERT_ID() as id FROM myTable; This query really makes no sense. It is almost the same as: SELECT LAST_INSERT_ID() as id; It returns the last inserted Id, but why does it return that value for every row in the table. What would you expect it to do? This is working exactly as I would expect. _Perhaps_ you mean: SELECT id FROM myTable WHERE id = LAST_INSERT_ID(); but I am not entirely sure. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: insert for datatype of set
http://www.mysql.com/doc/S/E/SET.html On Tuesday 23 April 2002 1:45 pm, Jim Philips wrote: I couldn't find this in the documentation. What is the propoer sql to insert into a field with a data type of set? My field has the following set of acceptable values: GA, TN, SC, NC, AL Assume I am inserting multiple values, such GA, TN, SC. If I separate them with commas, mysql will assume they are separate fields. So, what is the way out of this? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Mysql Installation problem with 3.23.49 Linux Source release on RH7.3 Beta 1.
Do you have g++ installed? It doesn't look like you do. On Friday 19 April 2002 1:45 pm, Ricky Sun wrote: I am trying to install mysql 3.23.49 source release on RH7.3 Beta 1 workstation... Encountered the following gcc C++ compiler executable creation problem when ./configure checks for C++ compiler it complains : checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking for c++... no checking for g++... no checking for gcc... gcc checking whether the C++ compiler (gcc ) works... no configure: error: installation or configuration problem: C++ compiler = =3D cannot create executables. The version of gcc I am using is 2.96 2731... any hints? Why it's not recognized as a C++ compiler? $gcc -v Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs gcc version 2.96 2731 (Red Hat Linux 7.2 2.96-109) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: WHERE codition test
I'm not sure what you are asking. Everything is working correctly as far as I can see. On Tuesday 16 April 2002 10:19 am, Svensson, B.A.T. (HKG) wrote: Is this a documented behavior of MySQL(?): mysql create table test (a int); Query OK, 0 rows affected (0.03 sec) mysql insert into test values(0); Query OK, 1 row affected (0.00 sec) mysql insert into test values(0); Query OK, 1 row affected (0.00 sec) mysql insert into test values(1); Query OK, 1 row affected (0.00 sec) mysql insert into test values(2); Query OK, 1 row affected (0.00 sec) mysql insert into test values(3); Query OK, 1 row affected (0.00 sec) mysql select x.a from test x where 1; +--+ | a| +--+ |0 | |0 | |1 | |2 | |3 | +--+ 5 rows in set (0.00 sec) mysql select * from test where 0; Empty set (0.00 sec) mysql select x.a from test x where x.a; +--+ | a| +--+ |1 | |2 | |3 | +--+ 3 rows in set (0.00 sec) mysql select x.a from test x where 'a'; Empty set (0.00 sec) mysql - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: WHERE codition test
mysql select x.a from test x where 1; 1 evaluates to be true, so this should select all rows. And it does. 5 rows in set (0.00 sec) mysql select * from test where 0; This evaluates to false, so this should not select any rows. And it does. Empty set (0.00 sec) mysql select x.a from test x where x.a; This should select all rows where the a column's value evaluates to true. And it does. 3 rows in set (0.00 sec) mysql select x.a from test x where 'a'; Empty set (0.00 sec) I'm not quite sure why this doesn't return anything, to tell the truth. That said, I cannot understand why you'd ever set up a query like these. On Tuesday 16 April 2002 11:21 am, Svensson, B.A.T. (HKG) wrote: Basically I am just curious, and I did perform some few small test. But, I was suspecting to get all rows when I did something like WHERE valid string, but had to write something like WHERE NOT valid string which feels a little bit upside down for me considering that integers apart from zero evaluates to true. Also it seams like this is not ISO SQL, so it could be a bit tricky to predict the outcome without actually having some specification of the behavior. //Anders -Original Message- From: Christopher Thompson Sent: Tuesday, April 16, 2002 6:24 PM To: Svensson, B.A.T. (HKG); Mysql List Subject: Re: WHERE codition test I'm not sure what you are asking. Everything is working correctly as far as I can see. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: subselect query
Read the manual. MySQL doesn't support subselects but offers you alternatives. On Monday 15 April 2002 2:45 pm, Jeff Shipman wrote: I'm trying to do a fairly simple select of a column from a table where the date of that column happens to be the highest value. I tried this: SELECT name FROM products WHERE prod_type='foo' AND added=(SELECT MAX(added) FROM products WHERE prod_type='foo'); But I get the error: ERROR 1064: You have an error in your SQL syntax near 'SELECT MAX(added) FROM products WHERE prod_type='foo')' at line 1 Is there a problem with the parentheses? I've used this syntax with Oracle before with no troubles. name and prod_type are TINYTEXT and added is a DATE. Is there another way I should be doing this? I could probably order descending by the added date and then just LIMIT 1, but I don't think that's very clean. 'mysql --version' returns: mysql Ver 11.15 Distrib 3.23.41, for -freebsd4.4 (i386) Thanks in advance, - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: subselect query
http://www.mysql.com/documentation/mysql/bychapter/manual_Introduction.html#ANSI_diff_Sub-selects On Monday 15 April 2002 2:49 pm, Jeff Shipman wrote: Yeah, that nasty thing with temporary tables and such? Or am I looking at the wrong page? If you could point me in the right direction, I'd appreciate it (slow modem connection, etc). Christopher Thompson wrote: Read the manual. MySQL doesn't support subselects but offers you alternatives. On Monday 15 April 2002 2:45 pm, Jeff Shipman wrote: I'm trying to do a fairly simple select of a column from a table where the date of that column happens to be the highest value. I tried this: SELECT name FROM products WHERE prod_type='foo' AND added=(SELECT MAX(added) FROM products WHERE prod_type='foo'); But I get the error: ERROR 1064: You have an error in your SQL syntax near 'SELECT MAX(added) FROM products WHERE prod_type='foo')' at line 1 Is there a problem with the parentheses? I've used this syntax with Oracle before with no troubles. name and prod_type are TINYTEXT and added is a DATE. Is there another way I should be doing this? I could probably order descending by the added date and then just LIMIT 1, but I don't think that's very clean. 'mysql --version' returns: mysql Ver 11.15 Distrib 3.23.41, for -freebsd4.4 (i386) Thanks in advance, - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: trouble with join
On Saturday 13 April 2002 4:34 pm, Samwise Gamgee wrote: I am trying to update a table with information from that same table and another table. I have two tables, player and goalie, for a hockey pool. The field pool_points is total points for forwards, goals * 2 for defencemen and point + wins * 2 + ties + shutouts * 5. The goalie table is separate as goalies have a bunch of different stats than skaters. The goalie table's information is matched to the player via the field called player_index. Each player has a player index(unique) and each table subsequently has a player_index field. It is the primary key on player, but as of now goalie doesn't have a primary key. Here is the query that I tried: mysql update player set pool_points = points + - (select (shutout*5) +(wins*2) +(ties) - from goalie, player where goalie.player_index = player.player_index) - where position = 'g'; ERROR 1064: You have an error in your SQL syntax near 'select (shutout*5) +(wins*2) +(ties) from goalie, player where goalie.player_ind' at line 2 You cannot do a subselect in MySQL at the moment. Read the manual on how you can get around this. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: load data infile file location???
On Friday 12 April 2002 2:26 pm, BJ Phillips wrote: I can load files from '/home/mysql' but when trying to do it from any other user ('/home/user/directory'), I get an error 13 about cannot get stat on file such and such. The files are located on the server and are owned by the user, both mysql user and the system user. I specify the full path to the files, but still no good. Like I said, the only difference is the location of the files/home/mysql versus /home/user. What is the deal? Does the directory (/home/user/directory) have the same permissions (and the all-readable permission) as /home/mysql? For that matter, what about /home/user? Either the directories and all associated files should be owned by the mysql user (which _could_ be the user 'nobody'), or they should be world-readable and the directories should be world-exec. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: update question number in mysql
You shouldn't be storing the questio number at all. You have denormalised your database and this is why you are experiencing this problem. Instead, store a unique identifier with each one (an 'id' field, autonumbering) and then, when you pull back all the questions, order it by this ID field. Your questions won't have numbers assigned to them but you can do that in whatever app uses the questions. Of course, the truth is that you _can_ do what you want just using SQL. But trust me, you don't want to. It would be at least O(n^2), I think, and would be a pain to write. On Friday 12 April 2002 2:38 pm, bin cai wrote: Hello, verybody, I am afraid to send my question again. i created a table in mysql database system to store exam questions which has the following column fields: questionnumber(integer),questionbody(String), answers (String) and etc. My problem is if i delete one row(question record) how can iupdate the questionnumber in the easiest way which means mysql can do for me. Is it possible? or i have to write a method to update questionnumber. if In second case i got another worry. for example, i wrote two querys,one is to delete this question record another query is to update the questionnumber,that is , all records whose questionnumbers are greater than the questionnumber of the deleted question should deducted by 1. if at the time After the first query is executed successfully and the second query is being executed, the computer is crashed. the second query will be rolled back. so the question is deleted but the questionnumber is not updated. this will result in a mess. If anybody can give me some hint i will appreicate very much Have a good weekend bin __ Music, Movies, Sports, Games! http://entertainment.yahoo.ca - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL concept question
Sure, just don't include it in the list of columns to bring back. SELECT column1, column2 FROM ... instead of SELECT * FROM... or SELECT columnIDoNotWant, column1, column2 FROM ... On Friday 12 April 2002 3:29 pm, Thi Cao wrote: Can I hide the auto_increment field? -Original Message- From: Gregory Junker [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 5:23 PM To: MySQL Subject: RE: MySQL concept question if you are interested in selecting records in the order in which they were inserted, apply an auto-increment/identity field to your table schema and when you select, use ORDER BY on that field. This is the only guaranteed way to retrieve records in the order in which they were inserted. -Original Message- From: Thi Cao [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 6:09 PM To: MySQL Subject: MySQL concept question All, When I insert records into a database, the records will be inserted in the order that I have them listed in my insert statement. So my question is, will the MySQL database always return the records in the order of insertion when I perform any type of select query in the future? Of course, I'm excluding queries that specify an order with the 'ORDER BY' clause. Does the MySQL database maintain some type of internal ordering ID for each record, and if so, can I always rely on the database to give me the records back as I have given to it? I know I can specify an order by having a column with some type of ordering value, but that's not what I'm interested in, so any answers to the above questions would be much appreciated. T.I.A. Thi - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Design decision on generating data
On Friday 12 April 2002 8:10 pm, Carl Schmidt wrote: I have a form where a user enters some numbers into text boxes. Some of the text boxes can be left blank. The business logic receives all variables to all text boxes. Should I : I'm assuming that you are using an executable file and NOT a web form. Any data you get from a web form, you must treat as suspect and perform business logic checks in another tier. 1.) Validate on the page for the presence of a value, and if not, set the corresponding value to -1 (it will never be this value). Therefore the business logic blindly inserts everything. This is reasonable. Alternatively, set the corresponding value to NULL. 2.) Do not have the variables that correspond to blank text boxes be set to -1. Have the business logic build a query based on which variables are or are not containing a value. In this case some fields for that row may be null. I'd avoid this if you can. Too much dynamicness and it will be hard to test. sql,query. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL concept question
On Thursday 11 April 2002 4:09 pm, Thi Cao wrote: All, When I insert records into a database, the records will be inserted in the order that I have them listed in my insert statement. So my question is, will the MySQL database always return the records in the order of insertion when I perform any type of select query in the future? Of course, I'm excluding queries that specify an order with the 'ORDER BY' clause. Does the MySQL database maintain some type of internal ordering ID for each record, and if so, can I always rely on the database to give me the records back as I have given to it? I know I can specify an order by having a column with some type of ordering value, but that's not what I'm interested in, so any answers to the above questions would be much appreciated. While I cannot speak for MySQL, you cannot generally rely on this. Certainly, SQL specifications are clear that you cannot rely on this and in general, it is a very bad plan. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: [newbie] efficiency issues
On Monday 08 April 2002 10:09 pm, Daniel Jarrett wrote: i'm building a table in MYSQL that has about 30 fields.. is this inefficient to have a large number of columns? Not necessarily, no. Often, it is more efficient. if anyone can direct me to some good info on efficient design tips/ techniques i'd be grateful. Read up on database normalisation. Any good database book will cover this. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: mySQL and innoDB
On Tuesday 09 April 2002 11:07 am, Alain Del Giust wrote: if you have a foreign key constraint, that field must be one of the values of the referenced column and that column, being an index, is never NULL OK so my understanding is that it is impossible with mySQL to do such things wich are basic with at least: Oracle Sybase Adaptive Server Enterprise Sybase Adaptive Server Anywhere What are you saying? If you are saying these databases allow a primary key column (or a unique key column) to contain a NULL, they are violating SQL92. By extension, any column that is a foreign key can also not be NULL. Perhaps you are saying something else. But if you are saying this, you can hardly take MySQL to task for properly supporting SQL92 (at least, in this instance). - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: mySQL and innoDB
On Tuesday 09 April 2002 11:47 am, Alain Del Giust wrote: I am just testing mySQL so I will be able to use it instead of Oracle Sybase ... I am not saying a PK can be NULL wich is impossible But a FK can be NULL and I'd like to know how to do that with mySQL I do not see this as being allowed in SQL92. In fact, my documentation says specifically that it is not allowed. That said, I understand now why you would want to do this. It seems to me that perhaps you just want to do without a foreign key and enforce the constraint programmatically? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MD5
On Tuesday 09 April 2002 2:13 pm, Andrew Hazen wrote: Hi, Can I use the MD5 function in the where clause, as in: Select * from table where md5(column)=value I see no reason why not but note that you are likely MUCH better off storing column as an MD5 hash, computing the MD5 of value, and then doing your select on that. That way, you won't have to calculate an MD5 value n times, where n is the number of rows in your table. sql filter daemon sucks. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: no subject
On Monday 08 April 2002 9:49 am, Chuck \PUP\ Payne wrote: Ok, I know I am going to get yell about this but how can I do an SQL and only show to fields from a table. For example I only like to see the names and birthday? Or will as so all fields for a given table. SELECT field1, field2 FROM tablename WHERE condition; - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Insert ?'s
On Friday 05 April 2002 10:16 am, john wrote: Insert into Sellers (Logo) values ('images/helilogo.jpg') where Seller_ID = 1; that is the command that I am attempting to issue, but states the where... is wrong. What's wrong with that? It isn't valid SQL. You are, I think, trying to do an update rather than an insert, though I'm not sure. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL Book
On Friday 05 April 2002 10:29 am, [EMAIL PROTECTED] wrote: We are writing a book about MySQL. There will be emphasis on using MySQL with perl/php, .net java. The publisher needs lots of emphasis on SPs and nested subqueries. We need to be able to write about implementing biz rules using table constraints, which means FKs. Your site says 4.1 is to have I must say, I think this is rather short-sighted of your publisher. I obviously do not speak for the MySQL folks but I don't think you should write a book on product features which do not exist yet. That said, it is often a better idea to move business logic out of the database and into another layer instead. At my previous job, we had to do this with MS SQL Server 2000 because the built-in triggers and foreign keys and the like were simply too slow so we did it programatically instead. Of course, we still used tranactions to ensure things were either all committed or all rolled back. In my opinion, this is the right approach to take with MySQL. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Beginners Question
On Friday 05 April 2002 2:54 pm, Zhao, Charles wrote: Thanks Todd and Tyler for the encouragement, When I searched on Mysql column types, I did not find any obviously suitable for images. I do not suppose I can use VARCHAR, can I? Use one of the BLOB types. Note that if you are running a web server, you might be better off just storing a path and filename in the database and have apache serve the image itself. Also, I need to have very good performance on data retrieval and transport, which means I also need to have maximum retrieval speed and minimun memory size of my images. My images are just plain graphics, no rich colors. How can I realize the above purposes? Photographic images should normally be stored as jpegs, line-art drawings as png. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Creating MySQL database using DAO
On Thursday 04 April 2002 2:21 pm, Guy-Maurice Lepoutre wrote: Hello, I would like to create a MySQL database using DAO and Visual C++ 6.0 (CDaoDatabase and CDaoRecordset). I know there is a Create() method on CDaoDatabase but I cannot figure out how to use it to create a mysql database. Does anyone know how to do this? You will likely need to set up an ODBC connection and connect through that. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: copying field x to field y for each record in table
Note also that by doing this, your database will be denormalised. This may not be a big deal, however. On Wednesday 03 April 2002 9:55 am, you wrote: UPDATE mytable SET field1=field2; -Original Message- From: Chuck Barnett [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 10:10 AM To: [EMAIL PROTECTED] Subject: copying field x to field y for each record in table Hi, how do I do the following: I have a table I have added a new field to, I want to take field X and copy it to the new field for each record. What should this query look like? Thanks, Chuck - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Subqueries
On Wednesday 03 April 2002 12:35 pm, Leo Przybylski wrote: Hello all, Does anyone know if MySQL can do subqueries? Not the current version, no. I am trying to provide a SELECT subquery to an IN clause and I am getting errors. Is this possible? Read the manual and follow the example on how to rewrite your query. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: insert value delimiters
On Wednesday 03 April 2002 2:02 pm, Lori Thompson wrote: Does MySQL have the capability for the user to specify their own delimiters for the command: INSERT into (database) values (value1, value2,...,valuen); The values that I am inserting contain both and '' and I am receiving a syntax error. Try escaping them (putting a backslash immediately before the troublesome character in your value). - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: hmm
On Thursday 28 March 2002 9:48 am, Harry Rorarius wrote: I thought Mysql was a server that could be used as a online database? Yes If it is, is there some material I have not read that tells me how to do this? What are you trying to do? You have not been at all clear in your requirements. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: query help
[For the spam-bot: Go away, you annoying little beast. You know I'm not posting spam so stop querying me about it and let's get back to the topic at hand; sql] On Sunday 03 February 2002 1:27 pm, Chuck Barnett wrote: Hi, I have a db field that holds the first and last name of a person. Is there a way to sort by the last name in that field? The whole reason for this is to populate a select box sorted by last name. I don't want to go back and create a separate field if I don't have to. Your database is denormalised and this is what is causing the problem. You could probably do this through string manipulation but it is almost always going to be a better idea to do this on the client side. Additionally, consider that you may not be able to handle names like 'von Neuman' and the like. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
[OT] Re: BCP
On Tuesday 26 March 2002 2:56 pm, Harpreet Kaur wrote: I am using C:\ BCP dbname.dbo.tblname out tblname.txt -S srvrname -U sa P sapwd -c -t \t -r \n to create a text file from a sqlserver table . Th text file shows a tab after every field except the last field. How can i get it to put a tab even after the last field. This does not seem to be relevant to MySQL. The best way of doing this would be to use perl. Should be a fairly simple perl script, just replace all \n with \t\n - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: binary expansion?
On Tuesday 26 March 2002 3:30 pm, adam nelson wrote: It's been a while since I've done this, does anybody remember: If I have 2 tables: tblPerson ( iPersonID int szPersonDesc varchar iPersonType int ) tblPersonType ( iPersonType int szPersonType varchar ) iPersonType = iPersonType (foreign key between the 2 tables) iPersonType is a list in the form of 1,2,4,8,16,32,64 so, let's suppose that szPersonType for 8 is lawyer and szPerson type for 2 is redhead a value of iPersonType of 10 would mean redhead lawyer. I'd like a query that looks for lawyers (ie. iPerson type is any number from 8 to 15 or 16+8=32 or 16+8+4=28 or 16+8+1=29 or 16+8+4+2=30 or 32+8=40 or 32+8+4=44 ,etc. up to the max(iPersonType)) Use AND. I forget the SQL syntax for it but in C, you'd do: if (iPersonType 8) { // yes } else { // no } Note that this is different from the operator. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: RSA encrypted strings - what data type?
On Tuesday 26 March 2002 3:26 pm, Steven Hajducko wrote: I'm trying to take a string ( In this case, a password ), and encrypt it with RSA encryption via the perl module, Crypt::RSA. Later on, I want to be able to pull the encrypted string back out and decrypt it. Note that if you do this, you must hard-code the key somewhere (unless you are prompting the user for it) which means you are simply obfuscating the data, not actually encrypting it. One of three things happens when I do this however. 1) Everything works fine. 2) I cannot insert the encrypted string. 3) The encrypted string is inserted, but incorrectly and will not decrypt. I tried using a blob or medium blob for the datatype, but neither will work 100% of the time. Has anyone done this before with a Mysql db and if so, how? What sort of datatype do you use for the field that will contain the encrypted string? Did you use a different type of encryption method? ( Keep in mind that I cannot use a one way encryption scheme for this. ) You need a blob. Are you sure you are storing the data as binary? Alternatively, it is probably of fixed size and so you could just store the resulting chunk of data as a series of 8 bit values. Note that if you do not need to be able to recover the password, just verify whether the password a user typed is correct, you CAN and, in fact, SHOULD use a one-way hash instead of an encryption. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL not using an index
What percentage of your database contains rows where status = 200? It looks to me like MySQL is estimating that perhaps 1/3 or more of the rows have that status and therefore, it is faster to simply do a table scan rather than using an index. On Monday 25 March 2002 1:08 pm, Michael C. Neel wrote: I'm nearing the end of my rope trying to figure this one out. I have some queries run against a table that is a log of hits from a web server. No matter how simple I've tried to make my query, MySQL sill does not choose an index. Even use index has no effect. My table: CREATE TABLE access_log ( id bigint(20) unsigned NOT NULL auto_increment, date datetime default NULL, host varchar(255) default NULL, domain varchar(255) default NULL, ip varchar(255) default NULL, method varchar(255) default NULL, port smallint(6) default NULL, url varchar(255) default NULL, urlpath varchar(255) default NULL, filepath varchar(255) default NULL, filename varchar(255) default NULL, filetype varchar(255) default NULL, referer varchar(255) default NULL, referer_domain varchar(255) default NULL, referer_query varchar(255) default NULL, browser varchar(255) default NULL, status int(11) default NULL, bytes int(11) default NULL, server varchar(255) default NULL, session_id varchar(255) default NULL, user_id varchar(255) default NULL, username varchar(255) default NULL, query varchar(255) default NULL, path_info varchar(255) default NULL, request varchar(255) default NULL, PRIMARY KEY (id), KEY domain (domain(10)), KEY url (url(10)), KEY filetype (filetype(5)), KEY status (status), KEY session_id (session_id(10)), KEY user_id (user_id(10)), KEY ip (ip(5)), KEY host (host(5)), KEY server (server(10)) ) TYPE=MyISAM; The query: SELECT * FROM access_log WHERE status=200 Gives this result in explain: *** 1. row *** table: MEP_access_log type: ALL possible_keys: status key: NULL key_len: NULL ref: NULL rows: 592042 Extra: where used 1 row in set (0.00 sec) I'm really running a much more complex query, but this simple one doesn't use an index so I don't think my query is affecting the index (again, I don't *think*). I've run analyze table a few times, and installed mysql 4.0.1-alpha (currently running 3.23.36), but with no change. Any idea or routes to look down would greatly help. Thanks, Mike - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: database and web servers
On Thursday 21 March 2002 11:28 am, Klym wrote: Is it possible to have your web server and your MySQL server running at different geographic locations? I'm wondering if I can run my own MySQL server here at home on Linux and have my web site use PHP to connect to it and extract data. Is that a bad idea for security and speed? You can certainly do this. When you connect to a MySQL database, you generally specify _where_ this database is. That said, network bandwidth may become a significant concern. And no, it isn't a good idea for security. A database should be protected by a firewall that only the web server can get through. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Benchmark
Have you looked at: http://www.mysql.com/information/benchmarks.html On Tuesday 19 March 2002 11:50 am, Kathy Reyes wrote: Hello all its me again Does any one now of any database benchmarking utility that I can use on mysql database??? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: differences
On Monday 18 March 2002 4:22 pm, [EMAIL PROTECTED] wrote: Everyone, What's the differences with MySQLD and MySQL-max? MySQL-max supports more table types. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: A problem with ROUND()
Your problem, I _think_, is that your query works as follows: for i = 0 to table_name.rows { row -- table_name.row[i] if row.count = ROUND(rand() * 10) then result += row } NOTE: ROUND(rand() * 10) is performed FOR EACH ROW in your table. You actually mean for it to be performed once and that specific row be returned. The solution, then, is to have a constant in your WHERE clause. Or at least, determine its value outside of the select statement. On Friday 15 March 2002 9:23 am, [EMAIL PROTECTED] wrote: I have database with table and 1 milions random characters. Key for searching each character is a counter from 1 to milion. when I execute statement: SELECT count, character FROM table_name WHERE count=ROUND(rand()*10); Example: count || character || 1 dasarewr 2 adswarwrf 3 sfdqwerw 4 dfweqrqwe 5 asdfwerdfwe 6 fdwerwer 7 fsdwefwe 8 frefer ... . daswer 1000 fdferte . 99asdwerer 100 dasrewg RESULT: 1) Sometimes I get just one result like: 4352342 dcfsfwer 2)Sometimes I get TWO results! 1000fdferte 99 asdwerer 3) sometimes even THREE 4) sometimes NONE The select statement must to gave me just ONE result! Does anyone know what that is about? Does ROUND() have any bugs? Sorry for bad english. Elvir ---end of your message--- MySQL Development Team - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Case sensitivity in Mysql
On Thursday 14 March 2002 9:32 am, BD wrote: Why or why couldn't MySQL have used case insensitive names in the first place? Store everything in lower case internally, but allow the user to use Invoice_Number or invoice_number or INVOICE_NUMBER in the SQL statement and it should refer to the same column. Same with table names. I don't see why you would want to have 3 different columns in the same table with names Invoice_Number, invoice_number and INVOICE_NUMBER. Maybe it's just me, but it doesn't make a lot of sense to have case insensitive names. It just leads to typos and the code doesn't run. :-( In SQL92, identifiers can only be uppercase letters and numerals. Therefore, if you are using lowercase, you are NOT writing valid SQL92. Most databases will allow this, of course. SQL99 adds support for lowercase characters but MySQL doesn't claim to implement SQL99 yet. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Transact Sql
On Tuesday 05 March 2002 10:15 pm, Amit Lonkar wrote: hi Does Mysql support Transat SQL??? Assuming you mean Transact SQL, no. 'Transact SQL' is Microsoft's name for their proprietary extensions to SQL. Only Microsoft SQL Server supports it. But then again, MS SQL doesn't support MySQL's extensions either. :) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: libncurses.so.5 problem
This is not a MySQL question, it's a Solaris question. :) But anyway, you need to get and install ncurses (version 5). You can find more information at: http://www.gnu.org/software/ncurses/ncurses.html On Wednesday 06 March 2002 8:57 am, Atif Faruqui wrote: Hello, I feel i am dead in the water with this problem, it appears that libncurses.so.5 is a linux library, i downloaded mysql-3.23.45 from sunfreeware and did pkgadd on it on Soalris 8 Sparc box, i was able to start mysqld daemon and i can run mysqladmin commands but when i try to connect i m getting : bash-2.03$ mysql ld.so.1: mysql: fatal: libncurses.so.5: open failed: No such file or directory Killed bash-2.03$ I have done a whole find for libncurses.so.5 on system and couldn't find it anywhere. I am really confused, please HELP. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Read previous record with C API
mysql_row_seek(). On Wednesday 06 March 2002 10:26 am, JOUANNET, Rodolphe wrote: Can someone tell me how to find the previous record in C (with mySQL API function). I do a SELECT statement, read it with mysql_store_result(), read the first record with mysql_fetch_row(), the next record with mysql_fetch_row(), etc.. . But what about reading the previous record ? (sorry for my english). Friendly. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL license problem on Windows
http://www.mysql.com/documentation/mysql/bychapter/manual_Introduction.html#MySQL_server_licenses On Wednesday 06 March 2002 1:17 pm, Zengfa Gao wrote: Hi,: I heard that when we use MySQL on windows, we need to pay fees. But I can't find anything on MySQL document to talk about this. Do you know this problem? Thanks a lot! Zengfa __ Do You Yahoo!? Try FREE Yahoo! Mail - the world's greatest free email! http://mail.yahoo.com/ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: connecting to all databases using one odbc connection..PLEASE HELP
On Tuesday 05 March 2002 11:11 am, Edward Peloke wrote: I asked yesterday but got no responses...anyone have any ideas how I can use one odbc connection but have access to all databases on the MSSQL server??? I have not tried this but have you considered using the use command? Or even perhaps specifying the database name along with the table name? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: mysql on Linux
No need to get all snarky. People are confused because there's a whole section in the manual that covers the installation, step-by-step, with no cryptic mumbo jumbo. This is at http://www.mysql.com/documentation/mysql/bychapter/manual_Installing.html#Linux-RPM and basically tells you to download the RPM and then install it using rpm -i. Alternatively, if you have a .tar.gz file, you can follow the install directions given therein. We _CANNOT_ help you further without you telling us what part of the install you are having problems with. The step-by-step instructions are available as people have pointed out. So what are you asking for? On Tuesday 05 March 2002 4:23 pm, Intrex wrote: Not to be sarcastic, but Pointing us all to ducumentation I HAVE READ 100 TIMES is NO help. I have read this file, I have used the appropriate .tar.gz, I have reinstalled, I have used the most current RPM's How about contributing something USEFUL, like a REAL answer, that anyone can follow. No cryptic mumbo jumbo, no PhD CRAPOLA. I mean REALLY. Mark - Original Message - From: Jorge del Conde [EMAIL PROTECTED] To: 'Manish Mehta' [EMAIL PROTECTED]; 'mysql' [EMAIL PROTECTED] Sent: Tuesday, October 09, 2001 1:48 AM Subject: RE: mysql on Linux Hi, Download the binary distribution that suits your system and read the INSTALL-BINARY file. Also, make sure the online documentation at http://www.mysql.com/documentation/index.html Regards, Jorge For technical support contracts, visit https://order.mysql.com/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Jorge del Conde [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer /_/ /_/\_, /___/\___\_\___/ Mexico City, Mexico ___/ www.mysql.com -Original Message- From: Manish Mehta [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 09, 2001 12:34 AM To: mysql Subject: mysql on Linux Hello I want to install mysql on Linux. What are the basic step followed at the time of installation. pl. gave any suitable idea. Manish Mehta E-mail: [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: www.fcliestal.ch
This has nothing to do with MySQL. Check out freesql.org and talk to them about your problems. On Monday 04 March 2002 1:31 am, Zandona Marcello BGV wrote: sql-problem! hello, please could you help me? after you made some work on your server.. the side of www.fcliestal.chdoes not work anymore because i did not change anything on it, i do not know, what to do... please could you reactivate the site? ... or at least give me some information what i have to do thank you very much, for your answer...! greetings from switzerland marcello zandona - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: extra max() function possibly very useful?
On Monday 04 March 2002 10:50 am, Richard Clarke wrote: create table mytable (id int, val char(255), hits int); insert some data... select max(5,hits) from mytable group by id; This would allow selecting of the top 5 rows for each id according to the hit column. Without this function it means the code must be written manually as, foreach(id) { select * from mytable where id='$id' order by hits desc limit 5 } Why would you do your select like that instead of: select * from mytable order by hits desc limit 5 ? And for the spam filter: mysql, microsoft sucks, nusphere lawsuit. :) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: SQL 2 Query in 1 table
On Friday 01 March 2002 9:21 am, BLANCHET wrote: Hi, Is it possible to make simultaneous 2 SQL queries in a MySQL database( update, insert and the other) on only 1 table. Because my DB is on a server and i I've 5 clients who works on the same table. Samuel For reasonable definitions of the word 'simultaneous', the answer is yes. Read up in the MySQL manual about locking, though. For 'spam' filter: MySql, INSERT, SELECT FROM TABLE - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Inserting text error
What is your query? What error message do you get? On Friday 01 March 2002 2:46 pm, Alexander Shaw wrote: Hi, I have an application running under Access 2000 with linked MySQL tables. At the moment I m trying to run a query to populate a second table. Some of the data in the query is a text description and for some reason is throwing up an error when I try to insert into the table. The error itself seems to appear as soon as there is a space between words in the description. Is there something I have overlooked or something I am doing wrong to cause this? Alex --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.325 / Virus Database: 182 - Release Date: 19/02/2002 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: FLOATing point bug? Or just a SQL rule
On Friday 01 March 2002 2:51 pm, Thomas LaCicero wrote: I am not sure if this is going to sound like a stupid question but here it goes... If I have a table with a Float field and, an entry in that field that has at least one decimal place, and I try to do a SELECT * FROM some_table WHERE some_float_field = 3.2 the query will return 0 rows even when there is a matching row. Hope I described this well .. I am running the latest 3.23 release (49a I think) Is this a bug in MySQL or does it have something to do with a SQL definition? This is a bug in your understanding of floating point numbers. The basic answer is that you cannot compare two floating point numbers in _ANY_ computer language using =. Check a small delta around the number you are searching for or store the float field as an integer (e.g. 32 in the above). This is related to the reason that you cannot write 1/3 in decimal... the number goes out to infinity. Now, consider binary. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: crash bug with ORDER BY text
For what it is worth, this does NOT cause 3.23.41 to crash. On Friday 01 March 2002 3:47 pm, Tony J. White wrote: Using versions 3.23.47 or 3.23.49a on linux i386 precompiled binaries. Using ORDER BY on a column that is type text causes a crash. The following MySQL Query crashes it's MySQL thread: create table test ( id int, note text); insert into test values (1, 'blah'); select * from test order by note; I haven't tried any other versions yet, but the crash doesn't happen with 3.23.21-beta. -Tony Tony J. White [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: large table cleanup in MySQL
On Thursday 28 February 2002 3:47 pm, Eric Colley wrote: I have a MySQL table of basic user information including email address as one of the fields. The table is about at the 10,000 record mark. I have a list of bad email addresses that another program found for me (around 2,000 records). Now how do I take this list of bad email addresses and run a command or macro of some sort that will delete all the records in the table with the email field equal to each one of those bad emails? Anyone have a suggestion for me? With all due respect, does this have anything to do with spam? Or is the list of email addresses you have here strictly opt-in where the user is required to confirm his address before being added to your list? Sorry for the check but some of us here find spam to be immoral... - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: large table cleanup in MySQL
On Thursday 28 February 2002 3:47 pm, Eric Colley wrote: I have a MySQL table of basic user information including email address as one of the fields. The table is about at the 10,000 record mark. I have a list of bad email addresses that another program found for me (around 2,000 records). Now how do I take this list of bad email addresses and run a command or macro of some sort that will delete all the records in the table with the email field equal to each one of those bad emails? Anyone have a suggestion for me? Okay. You'd normally do this with a subquery but MySQL does not support them. If you check the docs, you'll see that there's an example of how to delete stuff without using subqueries. Basically, you do it programmatically. Here's the pseudocode: list -- dbQuery(SELECT * FROM BadList) for each element in list dbQuery(DELETE FROM GoodList WHERE GoodList.id = + element.id) I've done this in C++, you might want to use some other language. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Zero's not being inputted in mysql database
On Tuesday 26 February 2002 4:00 pm, Scott Broderick wrote: Hello group! I am a newbe to this listing. What I am attempting to do is pass a number like 0123456 to a field in the mysql database which is setup as int(11) but for some reason, the zero is not written into the database but instead all that is written into that field is 123456 What am I doing wrong? Can someone help me please? Thanks What is wrong is your expectations. If you want to store the leading 0, you are NOT wanting to store an int. Instead, you are wanting to store a string (aka char or varchar). - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: quick reference guide
On Friday 22 February 2002 5:03 pm, Luie wrote: hello all, anybody know where to find a quick reference guide for mysql commands/functions? If you are looking for an SQL quick reference guide, check out SQL Instant Reference (2nd Edition) by Martin Gruber, published by Sybex. Very good book, though I wish they added more about DB normalisation. There are some very good books on MySQL specifically, Paul DuBois wrote one and I hope I got his name correct. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Linking tables using INNER JOIN
I am trying to do an inner join between three tables. Here is what I have tried: select * from MapConfig LEFT JOIN ConfigString USING (id) LEFT JOIN ConfigInt USING (id) WHERE MapConfig.layername = Roads; What I am trying to do is to pull back all rows from MapConfig associated with matching rows from ConfigInt and ConfigString. What I get, though, is info from MapConfig and ConfigString ONLY, nothing from ConfigInt. If I rearrange the order that ConfigString and ConfigInt appear, I get info from MapConfig and ConfigInt ONLY, nothing from ConfigString. Is my SQL messed up or is there a limitation in MySQL on the number of INNER JOINs you can do in one statement? I suppose I could probably use a temporary table for this but I'd rather not. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Linking tables using INNER JOIN
On Thursday 21 February 2002 3:29 pm, Rick Emery wrote: try: select * from MapConfig mc LEFT JOIN ConfigString USING (id) LEFT JOIN ConfigInt cf on mc.id=cf.id WHERE MapConfig.layername = Roads; Heh. It's been too long since I worked with SQL. Thanks, that worked perfectly. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: -fno-implicit-templates, -fno-exceptions,-fno-rtti problems
On Tuesday 19 February 2002 4:31 pm, Peng Zhao wrote: Can somebody tell me why these 3 flags must be added when I compile mysql from source code? I am trying to use another compiler I see no reason that these should be required. -fno-implicit-templates simply requires all templates to be explicit. -fno-exceptions tells the compiler that the code does not use exceptions (throw, catch, etc.) and results in a speed increase. -fno-rtti is for runtime type information, often used along with dynamic_cast and the like. Again, a speed increase and/or compiled code decrease if that is selected. instead gcc to compile mysql. But it doesnot accept these three flags. I'm curious... what are you using? Anyway, in summary and unless someone else speaks up, I see no reason why you'd actually need these flags. With gcc, these flags will improve performance a little but that is about all. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: -fno-implicit-templates, -fno-exceptions,-fno-rtti problems
On Tuesday 19 February 2002 4:56 pm, Peng Zhao wrote: Thanks for your reply. But You can find something from http://www.mysql.com/doc/I/B/IBM-AIX.html : Thanks, I hadn't noticed that. If you are using gcc or egcs to compile MySQL, you must use the -fno-exceptions flag, as the exception handling in gcc/egcs is not thread safe! (This is tested with egcs 1.1.) And it also says the mysqld will crash radmonly without -fno-exceptions flag. I wonder recent gcc maybe can go on without the flags? To be honest, I am not sure about the later versions of gcc. It surprises me somewhat that exceptions aren't thread-safe in egcs. Still, it would be worth trying out with gcc 2.95.x or gcc 3.x. I am using orcc to compile mysql. Can you tell me how gcc improve speed via avoiding exceptions? I mean if the source code contains throw-catch stuff, how gcc avoid that? And why throw-catch stuff is not performance If the source code contains throw-catch, you are stuck. You _must_ turn on exception handling in order to use them. However, many people write code without any exceptions at all and in this case, the compiler can save some effort by not supporting them. Note, though, that most modern implementations of iostream, etc. etc. probably use exceptions. You may want to try out Intel's C++ compiler for Linux if you are using an ix86 CPU. We used it here at work and it resulted in code that ran more than twice as fast, though we have never tried it with MySQL. And greetings to a fellow UofA student (though I've now graduated). - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL will not run on Debian Linux version 2.4
Prefix it with the path: /usr/local/mysql/mysqld start or whatever. On Friday 15 February 2002 3:16 pm, Mark M Jervis Jr. wrote: Hi, I am trying to install run MySQL version 3.23.43-pc-linux-gnu-i686. When I try to run it to finish installation and set up users, i get the following error: /usr/local/mysql# mysql start su: mysql: command not found I have also tried running MySQL with the mysqld start, mysqld, and mysql commands and all of them result in the same message. If you can help me I will be very grateful. Thank You, Mark - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: mysql minimum memory requirement
On Wednesday 13 February 2002 10:51 am, Shih-Hao Li wrote: Does anybody know what's the minimum memory requirement for mysql running on Redhat Linux and Sun Solaris? Please reply or cc to my email address. I have run MySQL with 32 megs of RAM quite happily. Note that this was NOT particularly fast but I didn't require a peak speed of even a transaction per second. More reasonably, it will depend almost entirely on your database structure. For simple databases, 128 megs should be more than enough. And you can go _all_ the way up from there. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL on Linux, Athlon MP stability?
On Wednesday 13 February 2002 12:10 pm, Trond Eivind Glomsrød wrote: Our kernel people love them - Athlon goodness, no VIA chipset. Good performance, good stability. Note that the Via kt266a (_not_ SMP chipset) is quite good these days. If I was building a dual-processor machine, there's no doubt I'd go for an Athlon system at the moment. For a quad-processor machine, I'd look much more closely at the P3 Xeon chip (the P4 Xeon has no 4-processor motherboards afaik). ObMySQL: Make sure you are CPU-limited before considering SMP machines. If you are hard drive limited, you aren't likely to see any advantage going for more CPUs. SELECT MySQL PostGreSQL, UPDATE, INSERT, terrorism, world trade centre, replication, etc. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Extracting fields from a table
On Wednesday 06 February 2002 3:35 pm, Claire Forchheimer wrote: I want to select all entries in my table that in a column with given dates findes all dates inbetween $from_date - $to_date. (These are vars that the user supplies from the HTML-page). I don't know how to set up the SELECT query. I tried the following way but it didn't work: SELECT * FROM table WHERE (col=$from_date - col=$to_date) What is the correct way? This is, I believe, covered in the manual. However, try replacing (col=$from_date - col=$to_date) with (col=$from_date AND col=$to_date) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Table join question
On Tuesday 05 February 2002 9:59 am, Barry J. Wiegan wrote: Hi, I'm trying to build a query to solve a fairly simple problem. I have two tables (A and B) linked by a common ID. I want to locate a specific record in A that is linked to two or more records in B based on second field in B matching certain criteria. I've tried every type of inner, outer, left, and right join to accomplish this, but can't come up with anything that works. EG: Select * from A inner join B on A.ID=B.ID where B.Val='25' and B.Val='35'; This will rturn zero matching records since B.Val can't equal 25 and 35 at the same time. SELECT * FROM A inner join B on A.ID = B.ID inner join B AS C on A.ID = C.ID where B.Val = '25' and C.val = '35'. Or something similar. I can't be bothered to open my SQL reference at the moment. :) (For the sake of completeness, it is worth realising that you would _often_ need to ensure that the row in B and C are not the same row... not necessary here, though as you know they aren't as B.val and C.val are different). - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Size Limitations
At 09:49 AM 1/30/2002 -0500, Hashim Ismail wrote: Is there a database size limitation with MySQl in the Windows NT and Windows 2000 enviroment? Like some databases have size limitation of 2GB. Yes. Read the manual. In a Windows environment, table sizes are limited to 2 gigabytes if memory serves, it is all in the manual, though. You can, of course, have more than one table in your database. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: question re: field size
At 02:34 PM 1/30/2002 -0600, Emily Kelley wrote: In the process of searching for a dynamic database solution for a work project I have just begun reading about MySQL. So far this looks like a very promising choice for us but I have one extremely basic question that I hope someone will kindly answer for me. Is there a character limit for text fields? Our current database info has been constructed in MS-Access 97 and we have a real problem with the fact that a text field is limited to 255 characters. We frequently have descriptive text and citations that can run over this length so it is a crucial that we find a system that will allow us to include all the related information for the documented event. From the MySQL Reference Manual: You can declare a VARCHAR column to be any length between 1 and 255. BLOB, TEXT L+2 bytes, where L 2 ^ 16 As 2 ^ 16 = 65536, it looks like you can store up to 64K of text in a MySQL text column. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Pattern Matching Problem
At 03:15 PM 1/29/2002 -0500, Douglas Brantz wrote: Hello, I have a big problem! I need to match all patterns in schdays from a variable schdays and if schdays = mwf it only turns up mwf and not all entries containing M, W or F. Is there a way to do this? mysql select schdays from courses where schdays LIKE %MWF%; +-+ | schdays | +-+ | MWF | +-+ 1 row in set (0.00 sec) mysql select schdays from courses where schdays LIKE %M%; +-+ | schdays | +-+ | MWF | | MW | | MW | | M | | M | +-+ 5 rows in set (0.00 sec) I need to be able to say select schdays from courses where schdays LIKE %schdays% Here is my code from the program: my $sth2 = $dbh-prepare(select id,schdays,time_to_sec(timein),time_to_sec(time out) from courses where schdays LIKE \\%$cschdays\%\ AND done=\Yes\etc.. So I need to be able to match any pattern with $cschdays. Do I need to parse out the letters and pattern match each one?? It should be easier. I'd do this by doing a pattern match on %M% and then joining it with a pattern match on %W% and then joining it with a pattern match on %F%. I forget which type of join you want, it's the one that is logical-OR. You may wish this was easier (and there may be an easier way of doing it), but the fundamental problem is that you think pattern matching in SQL works differently to how it actually works. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Need some easy select assistance
At 09:50 PM 1/29/2002 +0100, Torkil Johnsen wrote: Given this example: table CARS has got an entity Labourghini with car_id=5 table NEWS has got an entity Lambourghini displays new super model with date=2002-05-02, news_id=735 and car_id=5 Now: I want this output: NEWS HEADLINES date: headline (car_brand) SELECT date, headline, carname FROM news, cars where news.car_id = cars.car_id - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: next insert id
Not _necessarily_ true, surely, if there's another transaction active at the moment (assuming you are using a table that supports transactions)...? At 03:16 PM 1/29/2002 -0800, James Montebello wrote: SELECT MAX(id) FROM table; will get you the highest value for 'id', that +1 will be the 'next' value, until someone inserts a new row into that table. james montebello On Tue, 29 Jan 2002, Joel Wickard wrote: database,sql,query,table I need to find out what the next value will be in an auto_increment field will be. could someone help me out with the select statement? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: next insert id
Nathan: I suspect you are trying to solve the wrong problem. Why don't you tell us _why_ you think you need this value, what you are trying to accomplish. At 04:23 PM 1/29/2002 -0700, Nathan wrote: But if this is the MyISAM table type, and you performed an insert, then a delete, your MAX + 1 would get the next value of the series, but the auto_increment will actually use MAX + 2. Correct? Is there a system call to find out what MySQL will use next rather than the highest + 1? # Nathan - Original Message - From: James Montebello [EMAIL PROTECTED] To: Joel Wickard [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, January 29, 2002 4:16 PM Subject: Re: next insert id SELECT MAX(id) FROM table; will get you the highest value for 'id', that +1 will be the 'next' value, until someone inserts a new row into that table. james montebello On Tue, 29 Jan 2002, Joel Wickard wrote: database,sql,query,table I need to find out what the next value will be in an auto_increment field will be. could someone help me out with the select statement? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Group By Error
At 05:27 PM 1/28/2002 -0800, Lance Prais wrote: Why when I use the following SQL it get a ORA-00937: not a single-group group function What could I be doing wrong? I am only trying to group on Time_stamp. Thank you in advance SELECT ROUND(AVG(COUNT(Time_stamp))), MIN(COUNT(time_stamp)), MAX(COUNT(time_stamp)), Time_stamp FROM cp_license_use Where time_stamp = parmTime and time_stamp = SYSDATE-7 group by Time_Stamp) This SQL statement does not make any sense to me. What are you trying to do, exactly? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Mysql very slow --why???
At 05:19 PM 1/24/2002 +, [EMAIL PROTECTED] wrote: I've installed Mysql on my machine, two of my machines, one on win98 and other on windows 2000. But for some reason when the developer is trying to run any query from a VB applications, it tends to slow and hang both the machines. I 'm trying to use mysql as its supposed to be faster and better performing than Access. Am I missing some parameters when I set this up? Can you tell me why it hangs my pc and I am not able to run any other program unless I kill this process. You really need to give us a lot more information. Have you followed the tuning guide in the manual? Where are the queries bogging down? What is your table structure? Do queries outside of VB run slowly? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Tighly packed table
At 04:10 PM 1/24/2002 -0500, Michael Stearne wrote: We have a somewhat large read-only table (2.9 million recs). I am wonder if there is a utility that will look at each row of each columns and come up with a summary of the largest field (in character length) for each column. For example, scan each row's firstname field and report that the longest first name is 12 characters. That way I can ALTER the firstname field to be a char or varchar of 12? What would be better BTW? I don't know if CHAR or VARCHAR is better for you but as to the query here, it would seem easiest to write a short program to query all the rows and programatically determine the longest column length. That said, you could probably set up a SQL statement for it. There's a LENGTH function in SQL, isn't there? The statement would look SIMILAR to the following: SELECT MAX(LENGTH(t1.FIRSTNAME)) AS fnamelength FROM TableFoo t1, TableFoo t2 WHERE LENGTH(t2.FIRSTNAME) = fnamelength; (Please note that my university SQL instructor pointed out that I wrote SQL statements backwards to anyone else he had ever taught. For that matter, I did Prolog backwards, too. :) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Tighly packed table
Acck! Yes, please please do that. O(n) instead of O(n^2) (*). This is a much better solution. I was trying to convert 'there exists n such that for all m where n != m, n = m, return n'. Damn logic. (*) To be honest, I'm not even sure what the runtime of my original query was. A good query optimiser would have looked at it, realised I was probably drunk, and just refused to run it. At 05:50 PM 1/24/2002 -0500, Roger Karnouk wrote: select max(length(firstname)) from TableName; -Original Message- From: Michael Stearne [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 4:38 PM To: Christopher Thompson Cc: [EMAIL PROTECTED] Subject: Re: Tighly packed table Christopher Thompson wrote: At 04:10 PM 1/24/2002 -0500, Michael Stearne wrote: We have a somewhat large read-only table (2.9 million recs). I am wonder if there is a utility that will look at each row of each columns and come up with a summary of the largest field (in character length) for each column. For example, scan each row's firstname field and report that the longest first name is 12 characters. That way I can ALTER the firstname field to be a char or varchar of 12? What would be better BTW? I don't know if CHAR or VARCHAR is better for you but as to the query here, it would seem easiest to write a short program to query all the rows and programatically determine the longest column length. That said, you could probably set up a SQL statement for it. There's a LENGTH function in SQL, isn't there? The statement would look SIMILAR to the following: SELECT MAX(LENGTH(t1.FIRSTNAME)) AS fnamelength FROM TableFoo t1, TableFoo t2 WHERE LENGTH(t2.FIRSTNAME) = fnamelength; Looks good to me, thanks. Michael (Please note that my university SQL instructor pointed out that I wrote SQL statements backwards to anyone else he had ever taught. For that matter, I did Prolog backwards, too. :) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Tighly packed table
At 05:58 PM 1/24/2002 -0500, Michael Stearne wrote: The problem is, this query really hurts (I don't know if it finishes) for unindexed field for 2.9 million rows. But I'm sure it will finish eventually. Yes, it will really hurt. After all, there's no way for MySQL to do this other than pulling in this column one at a time from each and every row in the table and doing the string count. See if you can do a SELECT COUNT(*) FROM Table in a reasonable amount of time. If you can, you may want to do this programatically in a small C++ (or C, or whatever) program. It _may_ be faster. It may not, there'll be a lot of network traffic. SQL servers tend to be rather bad at string manipulation, something like this would be easy in C or in Perl. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Can Anyone explain / help with auto_increment fields.
At 10:23 PM 1/23/2002 +, you wrote: Hi, I have a blank table for some testing. 1 of the fields (the primary key) is an auto_increment and not null. how and what do I insert into this field to start off the recordsets. also once I have set the records going say to 1, what do I then insert if anything into this field for the next record ?? can some one give me a brief explaination of the auto_increment field. Do not insert any value into that column. It will be given a value automagically. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: three-way join
At 02:51 PM 1/23/2002 -0800, you wrote: i understand that creating a M:N relationship in mysql involves 3 tables, one of which being a bridge, but how do i join the first and third tables by way of a bridge? example: a table of subscribers and a table of magazines with a bridge in the middle. how do i select just the magazines fred is subscribed to? thanks in advance and sorry if this is a confusing question. Table S (subscribers) ID Name Table M (magazines) ID MagazineName Table B (bridge) SubscriberID MagazineID Sample data in S: 1 - Fred 2 - John 3 - Chris Sample data in M: 1 - Playboy 2 - Computer Gaming World 3 - Maxim Sample data in B: 1 - 1 1 - 3 2 - 1 2 - 2 3 - 2 How do you select just the magazines Fred subscribes to? SELECT MagazineName FROM M, B WHERE M.ID = B.MagazineID AND B.SubscriberID = (Fred's ID); Or something. My SQL is a little rusty, it's been about six months since I used it last. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Overwrite oldest data?
At 02:45 PM 1/23/2002 -0800, Eric Mayers wrote: I'm designing a system that will parse and store log files in a MySQL-Max-2.23 database (the log table will be innodb). I have a requirement that as the database fills towards maximum capacity that it writes over the oldest records rather than dropping new records. I'd like to know if this is something that can be handled by the database itself? Otherwise it will be up to the application. Has Yes, the database can handle this itself. That is, you can structure your UPDATE transaction such that it deletes old data... the question is whether you really want to do that... anyone written code to do this? Is it best to delete a chunk of old records when its full then continue inserting, or would something like: UPDATE logs SET col=data, date=newdate ORDER BY date DESC LIMIT 1 be better once the table was at capacity? (would this work at all?) If you want my advice, I'd structure it similarly to this: Maximum number of rows in the table is, say, 1. Do updates normally. Once every 30 minutes (or however often), prune that table such that only the top 1 entries stick around. Alternatively, you could: Do updates normally but keep track of count in a separate table. Note that you'd just increment this table, you wouldn't do a SELECT COUNT(*) each time. During the update, if the count is 11000, prune the table and readjust the count similarly. There are other options. I think these are the best. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: three-way join
Thanks, David. He is of course correct if you need to look up the name of the subscriber. If you already know the subscriber's ID, you can modify the query to look more like mine. In any case, try to avoid large joins. :) At 03:08 PM 1/23/2002 -0800, David Turner wrote: Sorry not real familar with MYSQL syntax yet but I think you'll be able to translate. select m.magazinename from s,m,b where s.name = 'fred' and s.id=b.subscriberid and m.id=b.magazineid ; On Wed, Jan 23, 2002 at 03:59:11PM -0700, Christopher Thompson wrote: At 02:51 PM 1/23/2002 -0800, you wrote: i understand that creating a M:N relationship in mysql involves 3 tables, one of which being a bridge, but how do i join the first and third tables by way of a bridge? example: a table of subscribers and a table of magazines with a bridge in the middle. how do i select just the magazines fred is subscribed to? thanks in advance and sorry if this is a confusing question. Table S (subscribers) ID Name Table M (magazines) ID MagazineName Table B (bridge) SubscriberID MagazineID Sample data in S: 1 - Fred 2 - John 3 - Chris Sample data in M: 1 - Playboy 2 - Computer Gaming World 3 - Maxim Sample data in B: 1 - 1 1 - 3 2 - 1 2 - 2 3 - 2 How do you select just the magazines Fred subscribes to? SELECT MagazineName FROM M, B WHERE M.ID = B.MagazineID AND B.SubscriberID = (Fred's ID); Or something. My SQL is a little rusty, it's been about six months since I used it last. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: mysql benchmark
Have you installed perl? You need it (and the Perl MySQL drivers) installed before you can benchmark. Also, you'll want to modify the batch files such that it uses a different user (possibly the root user if you haven't changed the password on that yet). Note that running the benchmark takes quite some time. At 02:32 PM 1/21/2002 -0600, you wrote: greetings. i am trying to use the benchmarking suite...got the perl dbi and dbd fine - but: C:\mysql\benchrun C:\mysql\bench\mysql\bin\mysqladmin refresh \mysql\bin\mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user: 'ODBC@localhost' (Using password: NO)' C:\mysql\benchperl run-all-tests --log --comment 2x Pentium II 400mz, 256M, un der vmware 'perl' is not recognized as an internal or external command, operable program or batch file. C:\mysql\benchdel limits\mysql-org.cfg Could Not Find C:\mysql\bench\limits\mysql-org.cfg C:\mysql\benchmove limits\mysql.cfg limits\mysql-org.cfg The system cannot find the file specified. C:\mysql\benchperl crash-me --force 'perl' is not recognized as an internal or external command, operable program or batch file. and run-all-tests is not recognized by DOS as executable. anyone have any experience with this?? gulp help:( /gulp thanks in advance, jd - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: mysql benchmark
At 02:41 PM 1/21/2002 -0600, jon-david schlough wrote: yep. perl is all good - got activestate perl fer windoze and the dbi and the dbd - everything went fine as i went thru the tutorial in the manual...i was able to: perl -v and get the version info... Great. So perl is in your path? I had a problem getting the MySQL drivers installed but this doesn't seem to be your issue. Also, you'll want to modify the batch files such that it uses a different user (possibly the root user if you haven't changed the password on that yet). okay - but which batch file? DOS isnt even seeing run-all-tests as .bat ? You can edit the run.bat file to pass in a username and/or password. Examine that and the run-all-tests which is a perl file. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
ostream, C, C++
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have a problem compiling an app that uses the MySQL C API. My program itself is C++ using Visual C++ 6.0 in Windows 2000, but the C api is plenty sufficient for me. I suspect the problem comes because when I include C++ streams, I use the ANSI C++ standard way of doing so: #include iostream (and then I import the std namespace) rather than the deprecated way of doing so: #include iostream.h When I include the C api by doing: #include config-win.h #include mysql.h I get a slew of errors. For the life of me, I cannot figure out how to fix them (I must be sleepy and/or hungry). Can someone help me out? I tried searching the mailing lists but I couldn't find anything. Here are my errors, everything else that does not use MySQL compiles just fine: f:\vs6\vc98\include\ostream(106) : error C2535: 'class std::basic_ostream_E,_Tr __thiscall std::basic_ostream_E,_Tr::operator (int)' : member function already defined or declared f:\vs6\vc98\include\ostream(66) : see declaration of '' f:\vs6\vc98\include\ostream(272) : see reference to class template instantiation 'std::basic_ostream_E,_Tr' being compiled f:\vs6\vc98\include\ostream(106) : error C2535: 'class std::basic_ostreamchar,struct std::char_traitschar __thiscall std::basic_ostreamchar,struct std::char_traitschar ::operator (int)' : member function already defined or declared f:\vs6\vc98\include\ostream(66) : see declaration of '' f:\vs6\vc98\include\ostream(373) : see reference to class template instantiation 'std::basic_ostreamchar,struct std::char_traitschar ' being compiled f:\vs6\vc98\include\ostream(106) : error C2535: 'class std::basic_ostreamunsigned short,struct std::char_traitsunsigned short __thiscall std::basic_ostreamunsigned short,struct std::char_traitsunsigned short ::operator (int)' : member fu nction already defined or declared f:\vs6\vc98\include\ostream(66) : see declaration of '' f:\vs6\vc98\include\ostream(379) : see reference to class template instantiation 'std::basic_ostreamunsigned short,struct std::char_traitsunsigned short ' being compiled f:\vs6\vc98\include\istream(103) : error C2535: 'class std::basic_istream_E,_Tr __thiscall std::basic_istream_E,_Tr::operator (int )' : member function already defined or declared f:\vs6\vc98\include\istream(67) : see declaration of '' f:\vs6\vc98\include\istream(423) : see reference to class template instantiation 'std::basic_istream_E,_Tr' being compiled f:\vs6\vc98\include\istream(103) : error C2535: 'class std::basic_istreamchar,struct std::char_traitschar __thiscall std::basic_istreamchar,struct std::char_traitschar ::operator (int )' : member function already defined or declared f:\vs6\vc98\include\istream(67) : see declaration of '' f:\vs6\vc98\include\istream(544) : see reference to class template instantiation 'std::basic_istreamchar,struct std::char_traitschar ' being compiled f:\vs6\vc98\include\istream(103) : error C2535: 'class std::basic_istreamunsigned short,struct std::char_traitsunsigned short __thiscall std::basic_istreamunsigned short,struct std::char_traitsunsigned short ::operator (int )' : member function already defined or declared f:\vs6\vc98\include\istream(67) : see declaration of '' f:\vs6\vc98\include\istream(564) : see reference to class template instantiation 'std::basic_istreamunsigned short,struct std::char_traitsunsigned short ' being compiled -BEGIN PGP SIGNATURE- Version: PGP Personal Security 7.0.3 iQA/AwUBPEhuBgAttZAy2w6WEQJKeQCg7Q0Boc2Fe8GP/sWhqYRNok9bOqUAoLHQ Wd+TBIoG6WffQGGbjJ/WmWX+ =AeiD -END PGP SIGNATURE- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: 2cpu vs 4cpu / use of many cpus
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 At 03:44 PM 1/18/2002 -0500, you wrote: We use mysql heavily in production with tables over 30GB. We are going to purchase a new db server soon and the decision to be made now is whether we should go with a 4 cpu 700-900MHz system or a 2 cpu 1.4GHz+ system. Most of the time there is only one connection to this large database doing large queries including joins. What I am trying to find out is when (and how well) extra CPUs could speed up SQL operations when there is only one client/connection. In the opinion of those who know, which system would best serve our needs? The four slower processors, or the two faster processors? Why? From the user manual: 9.3.1 MySQL Threads The MySQL server creates the following threads: * The TCP/IP connection thread handles all connection requests and creates a new dedicated thread to handle the authentication and and SQL query processing for each connection. * On Windows NT there is a named pipe handler thread that does the same work as the TCP/IP connection thread on named pipe connect requests. * The signal thread handles all signals. This thread also normally handles alarms and calls process_alarm() to force timeouts on connections that have been idle too long. * If mysqld is compiled with -DUSE_ALARM_THREAD, a dedicated thread that handles alarms is created. This is only used on some systems where there are problems with sigwait() or if one wants to use the thr_alarm() code in ones application without a dedicated signal handling thread. * If one uses the --flush_time=# option, a dedicated thread is created to flush all tables at the given interval. * Every connection has its own thread. * Every different table on which one uses INSERT DELAYED gets its own thread. * If you use --master-host, a slave replication thread will be started to read and apply updates from the master. mysqladmin processlist only shows the connection, INSERT DELAYED, and replication threads. As you are looking at having only one connection, I would say it is likely that 2 1.4 Ghz CPUs will give you better results than 4 900 Mhz CPUs, all other things being equal. Also, remember that operating systems don't scale linearly in the best of cases, though Linux scales well up to 4 CPUs. Someone more knowledgable than I will speak up, I'm sure, but I'd focus on dual CPUs with more memory rather than going for a 4 CPU machine. Also, high speed disks would be nice, too. In fact, I'd say more likely you'll see more performance with ONE CPU with more memory and faster drives than you would with a 4 CPU machine limited in RAM and hard drive speed. -BEGIN PGP SIGNATURE- Version: PGP Personal Security 7.0.3 iQA/AwUBPEiLrgAttZAy2w6WEQIYKgCghq00GE1/2TXOguN6FkxacH9gumMAn0Vi eUcuISI6S/W/h0KtvDeAliuy =gmoV -END PGP SIGNATURE- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php