RE: ?
You forgot the comma before PRIMARY. Patrick -Message d'origine- De : Toth Dalibor [mailto:[EMAIL PROTECTED]] Envoy : mardi 27 fvrier 2001 09:51 A : '[EMAIL PROTECTED]' Objet : ? DROP TABLE IF EXISTS recepti; CREATE TABLE recepti ( rid smallint(6) NOT NULL auto_increment, put varchar(20), nazivStranice varchar(15), nazivRecepta varchar(60), brojOsoba varchar(15), uvod text, slika varchar(40), nacinPripreme text, savjet text NOT NULL, vrijemePripreme_min tinyint(3) unsigned, energVrijedJednogObroka_kJ smallint(6), datumEmitiranja_maleTajne date DEFAULT '-00-00' NOT NULL, izvorRecepta varchar(50) NOT NULL, FULLTEXT (uvod,nacinPripreme) PRIMARY KEY (rid) ); MySQL said: You have an error in your SQL syntax near 'PRIMARY KEY (rid) )' at line 16 What is wrong here??!! Please, answer! Bye. - 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
Problems with splitting data across different disks under Windows...
Hi, I'm working under Windows 98 with MySQL version 3.23.29. I tried to connect to a database that is on a different disk from the data directory (g:\mysql\data). So I created a file g:\mysql\data\pfi.sym containing the path e:\databases\pfi. I compiled with the USE_SYMDIR option and launched the server with -s option. When I execute the "SHOW DATABASES" command, I can see that "pfi" database exists. When I try to connect to "pfi" database, I get the message "unknown database". Did I do something wrong ? I had a look in the code and got the error in mysql_change_db function. I saw nothing in this function taking into account the symbolic links... Thanks Patrick ______ Patrick Fiche - Prologue Software (France) Software Engineer Email: [EMAIL PROTECTED] Internet : http://www.prologue-software.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
RE: Slow Select count(*) - Second Post
All of your columns are indexed but in an SQL query, only one index can be used... So, if you build an index matching exactly the columns used in your query, you will parse only the lines that match your query... So, if I'm not wrong, you will only parse 11 or 17 lines depending on your query and it should be quite immediate. The only problem is that you can't build as many indexes as you have queries in your application or your files will become very large and updates will take longer... That's why, you really need to globally analyse your application to see which fields are often used in WHERE clauses. Patrick -Message d'origine- De : Robin Keech [mailto:[EMAIL PROTECTED]] Envoy : mardi 20 fvrier 2001 16:15 : '[EMAIL PROTECTED]' Objet : RE: Slow Select count(*) - Second Post Thanks for your response, What benefit would that give me? Would a combined index be faster? I have the three columns indexed anyway, and do not really want to dedicate more of my index file to a duplication . it is getting to the 1G mark already, and I have a 2G limit for any one file. I have some more information that may prove useful... If I do a select count(*) with the date set to 2001-02-10 then the soc_date index is used and the query runs really quickly mysql explain select count(*) from log where queue_id = 5 and soc_date = '2001-02-10'; +---+--++--+-+---+-- -++ | table | type | possible_keys | key | key_len | ref | rows | Extra | +---+--++--+-+---+-- -++ | log | ref | soc_date_idx,q_idx | soc_date_idx | 4 | const | 42558 | where used | +---+--++--+-+---+-- -++ 1 row in set (0.00 sec) However, if I do a select count(*) with the date set to 2001-02-11 then the q_idx is used and the query runs very slowly. mysql explain select count(*) from log where queue_id = 5 and soc_date = '2001-02-11'; +---+--++---+-+---+---+- ---+ | table | type | possible_keys | key | key_len | ref | rows | Extra | +---+--++---+-+---+---+- ---+ | log | ref | soc_date_idx,q_idx | q_idx | 5 | const | 58410 | where used | +---+--++---+-+---+---+- ---+ 1 row in set (0.00 sec) Here are the real life results: mysql select count(*) from log where queue_id = 5 and soc_date = '2001-02-10'; +--+ | count(*) | +--+ | 11 | +--+ 1 row in set (0.89 sec) mysql select count(*) from log where queue_id = 5 and soc_date = '2001-02-11'; +--+ | count(*) | +--+ | 17 | +--+ 1 row in set (1 min 52.85 sec) Here are the results of the explains if the queue_id is taken out of the where. The rows estimate is fairly similar. mysql explain select count(*) from log where soc_date = '2001-02-11'; +---+--+---+--+-+---+---+--- --+ | table | type | possible_keys | key | key_len | ref | rows | Extra | +---+--+---+--+-+---+---+--- --+ | log | ref | soc_date_idx | soc_date_idx | 4 | const | 60410 | where used; Using index | +---+--+---+--+-+---+---+--- --+ 1 row in set (0.00 sec) mysql explain select count(*) from log where soc_date = '2001-02-10'; +---+--+---+--+-+---+---+--- --+ | table | type | possible_keys | key | key_len | ref | rows | Extra | +---+--+---+--+-+---+---+--- --+ | log | ref | soc_date_idx | soc_date_idx | 4 | const | 42564 | where used; Using index | +---+--+---+--+-+---+---+--- --+ 1 row in set (0.00 sec) Is it just tipping the balance and making the optimiser choose a different index? If so, why does the select against the queue_index take so long? Thanks for your help in advance, Robin -Original Message- From: Patrick FICHE [mailto:[EMAIL PROTECTED]] Sent: 20 February 2001 14:26 To: Robin Keech Subject: RE: Slow Select count(*) - Second Post Hi, What do you think of creating a combined index containing fro example soc_date, server_id, queue_id ) in this order... It depends of course of your application as the index choice is usually one of the most difficult tasks when designing a database. Patrick - Before posting, please check: http://www.mysql.com/manual.php (the manual) http
concurrency in mysqld library ?
Hi, We would be very interested in the possibility to link our application to mysqld library. We wanted to know if some concurrency will be managed to provide data integrity if two instances of my application are working at the same time... If not, is there a possibility to do it or do I just have to use Client/Server solution ? Does someone have an approximative date for 4.0 release. It seems that in the TODO list, it appears as a quick version... Thanks Patrick __ Patrick Fiche - Prologue Software (France) Software Engineer Email: [EMAIL PROTECTED] Internet : http://www.prologue-software.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
No answer for previous mail : Use of mysql_use_result in ODBC driver
Hi, I had not answer at my first mail... Sorry for posting it again but this is really important for us. -Message d'origine- De : Patrick FICHE [mailto:[EMAIL PROTECTED]] Envoy : lundi 12 fvrier 2001 18:09 : Mysql Objet : Use of mysql_use_result in ODBC driver ? Hi all, I would like to change the do_query function in execute.c module in the ODBC driver to use mysql_use_result function instead of mysql_store_result function. There is currently some comments with an eventual problem in case of SQLRowCount function. To my mind, the only thing would be that SQLRowCount could only return a result on UPDATE, INSERT and DELETE statements but not anymore on SELECT statement if you didn't retrieve all the rows. But the return value of SQLRowCount function is driver-defined for SELECT statements... So is it really a problem? Thanks for your help Patrick __ Patrick Fiche - Prologue Software (France) Software Engineer Email: [EMAIL PROTECTED] Internet : http://www.prologue-software.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
Use of mysql_use_result in ODBC driver ?
Hi all, I would like to change the do_query function in execute.c module in the ODBC driver to use mysql_use_result function instead of mysql_store_result function. There is currently some comments with an eventual problem in case of SQLRowCount function. To my mind, the only thing would be that SQLRowCount could only return a result on UPDATE, INSERT and DELETE statements but not anymore on SELECT statement if you didn't retrieve all the rows. But the return value of SQLRowCount function is driver-defined for SELECT statements... So is it really a problem? Thanks for your help Patrick __ Patrick Fiche - Prologue Software (France) Software Engineer Email: [EMAIL PROTECTED] Internet : http://www.prologue-software.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
Date for Gemini project
Hi, Does anyone have an idea of the date when the developments of Gemini project will be integrated into MySQL ? Will it be integrated in the MySQL 4.0 version ? Will it be integrated in the standard MySQL sources without changing the license agreement ? I read that this project resulted in the integration of the kernel of a successful commercial databas. Could we already have some idea about performance against MyISAM tables ? Thanks Patrick Fiche - Prologue Software (France) Software Engineer Email: [EMAIL PROTECTED] Internet : http://www.prologue-software.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
RE: How to query and return nearest value...
Try something like this SELECT price, min(abs(price-value)) as Mini from table group by price order by Mini LIMIT 1 Patrick -Message d'origine- De : Robert Badaracco [mailto:[EMAIL PROTECTED]] Envoy : mercredi 24 janvier 2001 05:47 : [EMAIL PROTECTED] Objet : How to query and return nearest value... Hi, I have a range of decimal numbers (Prices) in a table column that I'd like to run a query against. I'd like to run a query with a value that returns the closest price to that value if it can't find a match. Is there some function that I can use in my query that will allow me to do this? Thanks, Bob - 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: Direct use of MyISAM in applications.
I'm afraid there is absolutely no documentation. You can look for some examples in the MYISAM sources directory. You just have to be aware that this API is not available in Client/Server mode. Furthermore, I don't think it will be possible to access the same data through SQL and Isam at the same time because of concurrency problems... Patrick -Message d'origine- De : Justin C. Darby [mailto:[EMAIL PROTECTED]] Envoy : mardi 23 janvier 2001 18:50 : [EMAIL PROTECTED] Objet : Direct use of MyISAM in applications. Can anyone give me more information on directly using MyISAM directly in applications? I'd heard that it was possible, but haven't ever seen any information relating to the subject appear on this list. (I know there's a libmyisam, but I don't know what to do with it beyond that..) Is the API documented at all? Thanks, Justin C. Darby - 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