Re: querry problem ( datetime = Monday - Sunday )

2005-09-03 Thread mfatene
I think that your solution is also a generic one. But i thought that since saturday and sunday are not business days, the query will not be played. On monday 08h00, we know that there is no new records in the table. I encourage Crisiti to study this solution also. Mathias Selon Michael

Re: question on how to create a subset table

2005-09-03 Thread mfatene
Hi, This is a design question. the selection of data types must be intergrated to your application. If you have a table with : name type apple fruit redcolor a simple query like select * from tbl where type ='fruit' will give only fruits to the users. You can if you have mysql 5.x create

RE: delete, where, and subselects...

2005-09-02 Thread mfatene
Hi, You can't delete selected rows from the same table in mysql. Just create a temp table containing the select result. And delete from table A where existe select ... from temp_table; Mathias -Original Message- From: Jason Pyeron [mailto:[EMAIL PROTECTED] Sent: vendredi 2 septembre

RE: querry problem ( datetime = Monday - Sunday )

2005-09-02 Thread mfatene
Hi Cristi, Look at this : mysql select now(); +-+ | now() | +-+ | 2005-09-02 23:15:21 | +-+ 1 row in set (0.00 sec) mysql select DATE_ADD(now(), INTERVAL -1 DAY); +--+ | DATE_ADD(now(),

Re: Hour counts

2005-07-27 Thread mfatene
Hi, You can use Timediff : mysql SELECT TIMEDIFF('2005-07-27 18:00', '2005-07-27 19:30'); +--+ | TIMEDIFF('2005-07-27 18:00', '2005-07-27 19:30') | +--+ | -01:30:00

Re: Hour counts

2005-07-27 Thread mfatene
Hi, You can use Timediff : mysql SELECT TIMEDIFF('2005-07-27 18:00', '2005-07-27 19:30'); +--+ | TIMEDIFF('2005-07-27 18:00', '2005-07-27 19:30') | +--+ | -01:30:00

Re: Where on count(*)

2005-07-26 Thread mfatene
Hi, Look at having : having count(*) 3 for example Mathias Selon Pupeno [EMAIL PROTECTED]: I have esentially this query (the list of integers may differ): SELECT `Plans`.`id`, `Plans`.`name`, count(*) as 'count' FROM `Plans` JOIN `TechsPerPlan` ON `Plans`.`id` = `TechsPerPlan`.`plan`

Re: null data in table question

2005-07-06 Thread mfatene
Hi, don't forget to apply the correct changes to your queries. Having NULLs or not, let you write for example : select ... from ... where midinials is NULL; And be aware about NULL indexation in some storages. Those values are not indexed for example in oracle. I'm not sure about innodb, but

RE: create unique index

2005-06-28 Thread mfatene
From: Scottnbsp;PurcellDate: June 28 2005 3:36pm Subject: create unique index Hello, I am reading the docs, but I am slightly confused. I have a table with a varchar(50) column (not a primary column) where I = do not want duplicates. It is a properties column, and I am getting =

Re: Ordinal number within a table

2005-06-28 Thread mfatene
Selon Kapoor, Nishikant [EMAIL PROTECTED]: [Sorry for cross-posting.] This is in continuation with the above mentioned subject - I am trying to find the 'display data order' for the returned resultset. The following thread very well answers my question: http://lists.mysql.com/mysql/185626

RE: Ordinal number within a table

2005-06-28 Thread mfatene
Selon Kapoor, Nishikant [EMAIL PROTECTED]: -Original Message- This is in continuation with the above mentioned subject - I am trying to find the 'display data order' for the returned resultset. The following thread very well answers my question:

Re: Character set on 4.1 and ujis support

2005-06-24 Thread mfatene
Hi, you may use somethinh lik ethis : $dbh-do(SET character_set_results=ujis'); look at http://dev.mysql.com/doc/mysql/en/charset-general.html Hope that helps Mathias Selon Gleb Paharenko [EMAIL PROTECTED]: Hello. What do your 'show' statements return when you execute them from the perl

Re: selecting more sum()

2005-06-23 Thread mfatene
Hi, just Start here http://dev.mysql.com/doc/mysql/en/select.html mathias Selon Octavian Rasnita [EMAIL PROTECTED]: Hi, I have the following tables: create table articles( id int unsigned not null primary key, title varchar(255) not null, body text not null ); create table

Re: Indexing not working

2005-06-23 Thread mfatene
Hi, have you created an index on (id, testId) ? i can't see the other indexes ? The only ones are the PK and testStudent, so the PK is used. Mathias Selon Sajith A [EMAIL PROTECTED]: I was trying to analyze a query that was taking almost 4 seconds to execute. While trying to create additional

Re: Indexing not working

2005-06-23 Thread mfatene
Hi Sajith, I tried to recreate you tables and do some tests, but i don't have significant data. So i don't take your explain plan. I suggest you to test after optimize table ... and analyze table ... if you stay with the problem and you can give me a set of data, i'll try to help more. Mathias

Re: Indexing not working

2005-06-23 Thread mfatene
Selon Michael Stassen [EMAIL PROTECTED]: The PK is not used, nor should it be. Look at the EXPLAIN output. Hi, i hate the confusion people do between the primary key and the automatic index on the PK. Primary key is a generic concept for all databases. It assumes unicity and managed data

Re: How to SELECT something (CONCAT) and search the field

2005-06-23 Thread mfatene
Hi, what's your version ? in 4.11 the two forms work : mysql select concat(firstname,' ','lastname') from names; +--+ | concat(firstname,' ','lastname') | +--+ | Jean lastname| +--+

Re: How to SELECT something (CONCAT) and search the field

2005-06-23 Thread mfatene
sorry for the first select (bad copy of a string 'lastname'): mysql select concat(firstname,' ',lastname) from names where concat(firstname,' ',lastname) like 'Jean Dupond%'; ++ | concat(firstname,' ',lastname) | ++ | Jean Dupond

RE: How to SELECT something (CONCAT) and search the field

2005-06-23 Thread mfatene
yes in therory. But practicaly, you always have business rules and data knowledge without what you can do nothing. so the substring must be constructed according to data. Mathias Selon Ben Kutsch [EMAIL PROTECTED]: the substring will only work as long as you don't have spaces in the first

Re: Extended insert syntax and replication

2005-06-23 Thread mfatene
Hi, this is a perl script converter for inserts to simple form. if you work from a mysqldump, you can try it to see if the converted inserts do not genrate errors : http://platon.sk/cvs/cvs.php/scripts/perl/mysql/mysqldump-convert.pl Mathias Selon Jeremiah Gowdy [EMAIL PROTECTED]: I have two

Re: Extended insert syntax and replication

2005-06-23 Thread mfatene
see this for troubleshootings : http://sunsite.mff.cuni.cz/MIRRORS/ftp.mysql.com/doc/en/Replication_Problems.html hope that helps Mathias Selon Jeremiah Gowdy [EMAIL PROTECTED]: The inserts succeed on the master, so the problem isn't my SQL syntax. They are legal extended inserts. It's

Re: Select performance

2005-06-22 Thread mfatene
hi, you didn't speakabout your tuning work on the databases with only one machine. Have you done such work with the indexation part for best performance ? I can tell you that several databases with about 40 Go for all is not huge. but if you want look at some linux clustering solutions like

Re: Shifting dates

2005-06-21 Thread mfatene
Hi, just see the client connection timezone here : http://dev.mysql.com/tech-resources/articles/4.1/time.html you should certainly use --default-time-zone='-3:00' Mathias Selon Simon Garner [EMAIL PROTECTED]: On 21/06/2005 2:45 p.m., Scott Haneda wrote: I need to run a BETWEEN select where

Re: FLUSH TABLES /w READ LOCK vs. GLOBAL READ_ONLY in making backups

2005-06-20 Thread mfatene
1) Reading TFM (http://dev.mysql.com/doc/mysql/en/flush.html) it appears that I do not have to 'FLUSH TABLES WITH READ LOCK' for each individual database. This statement flushes and locks all simultaneously. Am I correct? HI, to flush tables, you're right : flush table TOTO

Re: error when sending message

2005-06-20 Thread mfatene
Hi, Is dswu17.btconnect.com subscribed to the list with an activated login ? Mathias Selon Pooly [EMAIL PROTECTED]: I try to send a message to this list with another account, but the message came back with an error : Your message was not delivered to: mysql@lists.mysql.com for the

Re: E103

2005-06-20 Thread mfatene
Salut, Quel OS, quelle version ? Quel type d'install : compile or binary Mathias Selon [EMAIL PROTECTED]: Hello, I'm trying to install MySQL and I have an error file named E103; it has 0 Ko. What do I have to do in this case? Denisa Eustasius PS: it's the first time I install MySQL and

Re: E103

2005-06-20 Thread mfatene
as Rhino said, that's what i suggested. mathias Selon [EMAIL PROTECTED]: Salut Denisa, peux-tu essayer d'installer la 4.1.12 depuis le msi (après suppression de ce qui a été installé, même le répertoire) à cette url :

Re: cross-reference of field names in query

2005-06-20 Thread mfatene
Hi, SELECT @RES=data*2 AS intermediate_result, @RES + 1 AS final_result FROM table; can do the trick. Why not your method ? because it's v4.1 Mathias Selon Tom Cunningham [EMAIL PROTECTED]: Here's something I've been curious about: Referring to one field from another

Re: Help with pathnames on a LOAD DATA INFILE

2005-06-20 Thread mfatene
hi, havant't you an automatic naming to .htm such as test.txt.htm rather than test.txt ? it's an upload problem. Can you access your file online ? Mathias Selon Brian Dunning [EMAIL PROTECTED]: I've got a GoDaddy virtual dedicated server and I'm trying to run a LOAD DATA INFILE, but I keep

Re: Got error 127 from storage engine

2005-06-19 Thread mfatene
Hi amir, you have error 127 which means : C:\perror 127 MySQL error code 127: Record-file is crashed what i suggest is to use some of the solutions given here : http://dev.mysql.com/doc/mysql/en/repair.html if you could. another way is to increase tmp_table_size and use show processlist during

Re: How to summarize a table?

2005-06-18 Thread mfatene
Hu Juan, see my answer above Re: Subselect in an Update query. You can't update and select in a sybquery using the same table master. use tempo table for the join and update after. Mathias Selon Juan Pedro Reyes Molina [EMAIL PROTECTED]: I'm running mysql 4.1.7. For the sake of this

Re: need help in stroing and retreving images from database

2005-06-18 Thread mfatene
Hi, all binary docs can be inserted in blob columns. see this link for a php insert method :http://www.phpcs.com/code.aspx?ID=30945 this is mysql doc : http://dev.mysql.com/doc/mysql/en/blob.html Mathias Selon madderla sreedhar [EMAIL PROTECTED]: Sir , Iam working on Mysql5.0 version. Can

Re: Ordinal number within a table

2005-06-18 Thread mfatene
hi, the position of a record depend on the sort order you choose in your queries (generally order by) and the execution plan of them. this execution plan depends on data, indexes, and the query itself. So what you call order is candidate to changing between two selects. the method shown with

Re: How to summarize a table?

2005-06-18 Thread mfatene
Juan, i found you a link explaining the access and sqlserver ansi inner joins in update. it's in german, but can be read (i don't speak german :o)) : http://www.sql-und-xml.de/sql-tutorial/update-aktualisieren-der-zeilen.html but i've never tried this with mysql. there are some other methods, but

Re: Wrf files: how can I read them?

2005-06-17 Thread mfatene
Hi, there is link take the free trial on webex site. haven't you seen the seconf button ? Mathias Selon asteddy [EMAIL PROTECTED]: Hello, I have found Mysql Performance Tuning Seminar available for download, but I don't know how to see it. I have found something like Webex website, but I

Re: Re: Wrf files: how can I read them?

2005-06-17 Thread mfatene
Mysql seminar organizer's should answer. Mathias Selon asteddy [EMAIL PROTECTED]: Thank you, but why has mysql made seminars wich must be seen with a non-free software with a 14 days trial? Is there nothing else to see it? Asteddy Hi, there is link take the free trial on webex site.

Re: Subselect in an Update query

2005-06-17 Thread mfatene
Hi, There is one caveat: It is not currently possible to modify a table and select from the same table in a subquery. this phrase is from http://dev.mysql.com/tech-resources/articles/4.1/subqueries.html solution * create table t as Select field1 From table1 Where field2=Some Value

Re: can innodb_buffer_pool_size be set 2Gb on FreeBSD?

2005-06-17 Thread mfatene
Hi, i don't think so. 2 go is a limit of almsot 32-bits plateform, linux or others. Migrate to 64-bits. Mathias Selon Brady Brown [EMAIL PROTECTED]: Have any of you MySQL/FreeBSD cats successfully set innodb_buffer_pool_size 2G without runing into any of the memory allocation problems found

Re: can innodb_buffer_pool_size be set 2Gb on FreeBSD?

2005-06-17 Thread mfatene
pretty interesting. i'll test it for oracle. But the db_cache will be a simple swap file. i don't think it's as good as real memory for dirty lists management. Mathias Selon David Griffiths [EMAIL PROTECTED]: I'll post something I heard about when looking into upgrading Oracle 8i from

Re: Table full

2005-06-16 Thread mfatene
You have also 3000 * 7 millions columns to left joins to x,y,.. others tables. And you use myisam. this will certainly be a big update problem. I suggest you to transform your query into : 1. select using the left joins to see first the number of rows to be updated 2. according to this number

Re:Backing up live MySQL Databases

2005-06-16 Thread mfatene
hi, there will not be a lot of paying backup tools if just copying files is OK. You can't because active transactions change some files checkpoint, then you copied files are not at the same checkpoint state, and you can't use the copy for a restore. The only way is to lock all the tables if you

Re: Table full

2005-06-15 Thread mfatene
hi, seems to be a temp table (sybase notation). see max_temp_table_size Mathias Selon Emmett Bishop [EMAIL PROTECTED]: Howdy all, I have a question about a SQL statement that I'm trying to execute. When I execute the statement I get the following error: The table '#sql_bd6_3' is full. What

Re: problem

2005-06-15 Thread mfatene
Hi, don't you really want to write also in Times new roman your mysql data ? you forgot the tools, OS ... (client) or it's a big jock. Mathias Selon nicolas ghosn [EMAIL PROTECTED]: Dear mysql supports, I want to change the font color for database mysql , for example I want to insert data

Re: Table full

2005-06-15 Thread mfatene
sorri it's tmp_table_size. mysql show variables like '%table%'; ++--+ | Variable_name | Value| ++--+ | innodb_file_per_table | OFF | | innodb_table_locks | ON | | lower_case_table_names | 1| |

Re: How to write subqueries?

2005-06-14 Thread mfatene
Hello, You forgot a parenthesis in the regexp function. Second, if you construct your query with prepared statements, you can do it : mysql insert into vt_partition(pnid) values('01234567890'); mysql select concat('vt_',pnid) into @tbl from vt_parition where pnid regexp ('^[0-9]{11}$') ; mysql

Re: How to write subqueries?

2005-06-14 Thread mfatene
You're welcome. if you have more than one pnid, you should use perl or php. then use a loop to manage each pnid query, then send it to the server, and use it's result. another simpler solution : mysql create table sql as select concat('vt_',pnid) tbl from vt_parition where pnid regexp

Re: Tough queries

2005-06-14 Thread mfatene
Hi, for the first query, select concat(team_id,' (',sum(points),')') from games,points where games.game_id=points.game_id and games.team_id1=points.team_id group by team_id can solve the problem. For the second, join players and points. Mathias Selon David Legault [EMAIL PROTECTED]: Hello,

Re: idepontent inserts? Allowing INSERT to fail faster than SELECT/INSERT

2005-06-14 Thread mfatene
the already implemented solution is : select ... for update; a unique key gives you an error that you have to manage for updating rather than insert. you must catch and analyse that the error is duplicate key and not another. but this is right if you want lauch insert without waiting to see if

Re: Mysql Backup/Dump

2005-06-14 Thread mfatene
different box, different versions, use export/import (backup table or LOAD DATA) Mathias Selon Kory Wheatley [EMAIL PROTECTED]: I want to backup our entire Mysql database structure for mysql 3.23.58 and dump it in the newly installed mysql 4.1.10 What is the best command to do a backup

Re: Considering migration from MyISAM to InnoDB

2005-06-14 Thread mfatene
see the my.cnf examples in the install dir, and look at innodb* variables. you can migrate each table just using : alter table toto engine=innodb; Mathias Selon Stembridge, Michael [EMAIL PROTECTED]: I currently use MyISAM on an internal web application server; our data takes up 10mb at

Re: Optimises LEFT JOIN

2005-06-13 Thread mfatene
Hi zoltan if you know difference between inner join and left join, you can conclude than maybe there are a lot of rows in table1 which do not verify you join condition. This example show you that the result is different and and add'in where clause if you want to transform the left join result

Re: Database Table Date Assistance

2005-06-13 Thread mfatene
Hi scott, you can use datetime or timestamp. Using timestamp in this example shows you that now() can be a default or inserted value. You can also use current_tiumestamp. Other functions like date_add can help you to look for rows verifying interval days like in this example : mysql create table

Re: mysql decrypt

2005-06-13 Thread mfatene
Hi, Have you tried this ? i said the length, so you can rise it until working for tests. I used 32k and it works without any problem. I can remind that with a blob it works also : mysql create table t1( asunto varbinary(32000), asun varbinary(16) ); Query OK, 0

Re: Regarding NOT NULL Option for Table Fields....

2005-06-13 Thread mfatene
Hi ashok, With check, you could do iy, but they don't work with mysql. The only solution i ican see is an application control or : drop table if exists tempo; create table tempo like mine; insert into tempo values('',''); insert into mine select * from tempo where length(...)0; drop table tempo;

RE: How to load a remote db with lots of data?

2005-06-13 Thread mfatene
Hi, there is nothing simplier and faster than load data infile (LOCAL) since you can connect to the server Mathias Selon Berman, Mikhail [EMAIL PROTECTED]: Brian, How about an FTP service on your remote server? Mikhail Berman -Original Message- From: Brian Dunning

Re: best configuration for ip failover

2005-06-13 Thread mfatene
Hi, you can configure bin-log on one, and send logs the second server for sync. you will have an almost real-time synchronization env. problem is that you MUST use inodb for ttansactions, and apply exactly the changes to the standby server. no replication, no cluster. This is a simple but needed

Re: Re-use a result field into a query

2005-06-12 Thread mfatene
Well Alvaro, you can use variables to re-use resultas like that : mysql set @rs=0; Query OK, 0 rows affected (0.02 sec) mysql select 1, (@rs:=2+3) as result1, - (@rs*100) as result2 - from dual; +---+-+-+ | 1 | result1 | result2 | +---+-+-+ | 1 | 5 |

RE: storing recurring dates

2005-06-12 Thread mfatene
hi, have you tried to hack something with week, month and weekofyear ? there is an interesting url at http://dev.mysql.com/doc/mysql/en/date-and-time-functions.html be aware that the week begins on sunday. mysql select weekofyear('2005-01-02'); +--+ |

Re: (Fine) Tuning Server Parameters

2005-06-12 Thread mfatene
hi, look at insert buffer and buffer pool. This is quite interesting : http://sunsite.mff.cuni.cz/MIRRORS/ftp.mysql.com/doc/en/InnoDB_Insert_buffering.html mathias Selon Manoj [EMAIL PROTECTED]: Dear All, I am trying to tweak some server parameters to fine tune my MySQL (4.0.15) server

Re: Regarding NOT NULL Option for Table Fields....

2005-06-12 Thread mfatene
Hi, '' or empty string is not a null in mysql. This is true for Oracle ! this simple test lets you understand : * Without NULLs mysql create table notnull (t varchar(10) NOT NULL); Query OK, 0 rows affected (0.14 sec) mysql insert into notnull values('test1'); Query OK, 1 row

RE: How to control database size in MySQL Windows?

2005-06-10 Thread mfatene
Hi, in versions less than 5.x, show table status gives informations about rows and avg_row_length. The product gives you a correct approximation if the stats are analyzed. This is for actions from the client. another thing is the OS commands from your datadir (du -k). Hope that helps. Mathias

Re: help converting tables to excel format

2005-06-08 Thread mfatene
if you want to use excel i suppose you have also windows with more than 3 GO free disk. install win32 mysql put the files in the data directory of one existing database connect and use that database export data to an outfile by : select * from yourtable into outfile csv fields terminated by

Re: LOAD DATA INFILE with INNODB

2005-06-07 Thread mfatene
Hi, i did it. If you have myisam tables tables rather than innodb say it. if you have specific os, say it. i think you should elaborate, or read carrefully dev.mysql.com/doc Mathias Selon °l||l° Jinxed °l||l° [EMAIL PROTECTED]: i used start transaction before using SET AUTOCOMMIT=0; also i

Re: MySQL (SQL) Newbie.. Need help with a Query

2005-06-07 Thread mfatene
hi, that's the same. If you use between, mysql do the rest for you : mysql explain SELECT * FROM passengers WHERE - reservation_date_time = '2005-01-01 12:10:00' - AND reservation_date_time = '2005-05-01 12:10:00';

Re: change data prefix query

2005-06-07 Thread mfatene
Hi, thsi can be a solution, there are others : mysql select substring(id,1,2), substring(id,3,length(id)) from mytable; +---++ | substring(id,1,2) | substring(id,3,length(id)) | +---++ | UP|

Re: Slow LIMIT Query

2005-06-06 Thread mfatene
Hi Doug, with a desc index on stuffed_date, an optimiezd table, the query runs in : mysql select * from stuff order by stuffed_date desc limit 18,10; +---+--+ | id| stuffed_date | +---+--+ | 88233 | 2005-07-08 | | 88228 | 2005-07-08 | | 88218 |

Re: noob question

2005-06-06 Thread mfatene
Hi, look at this : mysql SET AUTOCOMMIT=0; mysql start transaction; mysql insert into inno values(2); mysql select * from inno; +--+ | t| +--+ |1 | |2 | +--+ 2 rows in set (0.00 sec) mysql rollback; mysql select * from inno; +--+ | t| +--+ |1 | +--+ 1

Re: mysql UNION

2005-06-06 Thread mfatene
did'n arrive. re-submitted -- sorry Selon [EMAIL PROTECTED]: Hi, If we forget the first method which i mis-adviced, i can give a third which is generic. suppose that you have an indexed type column on each table (what i did). You can work with 3 variables. If they are different, you

Re: MySQL (SQL) Newbie.. Need help with a Query

2005-06-06 Thread mfatene
resubmitted Selon [EMAIL PROTECTED]: hi, that's the same. If you use between, mysql do the rest for you : mysql explain SELECT * FROM passengers WHERE - reservation_date_time = '2005-01-01 12:10:00' - AND reservation_date_time = '2005-05-01 12:10:00';

Re: mirroring oracle database

2005-06-06 Thread mfatene
resubmitted Selon [EMAIL PROTECTED]: Hi, what is tour oracle version ? such tool can be done easily if you put your oracle database in archivelog. Be carrefull to datatypes and create your mysql database with innodb storage. Beginning the game, you can use LogMiner. A simple batch can

Re: Empty database name error

2005-06-06 Thread mfatene
resubmitted Selon [EMAIL PROTECTED]: variable basedir else change a param. in what you have as file, stop start and see. Mathias Selon Ed Kasky [EMAIL PROTECTED]: I added the line to the configuration file and removed --log-error= line from startup line but it still creates the

Re: mirroring oracle database

2005-06-06 Thread mfatene
Hi, what is tour oracle version ? such tool can be done easily if you put your oracle database in archivelog. Be carrefull to datatypes and create your mysql database with innodb storage. Beginning the game, you can use LogMiner. A simple batch can extract the redo SQL statements and apply them

Re: Access denied/password change

2005-06-06 Thread mfatene
hi , see -skip-grant-tables in dev.mysql.com/doc Mathias Selon Seena Blace [EMAIL PROTECTED]: Is there any way I can change passwd of database without knowing the administrator . I'm unable to get into the mysql prompt due to access denied message.I want to change passwd.How to do this?

Re: LOAD DATA INFILE with INNODB

2005-06-06 Thread mfatene
Hi, you transaction is implicit, so there has been an autocommit. Look at this example ! mysql start transaction; ^^ mysql load data infile 'd:\\ldfile.txt' into table ldfile; Query OK, 3 rows affected (0.00 sec) Records: 3 Deleted: 0 Skipped: 0 Warnings: 0 mysql

Re: Empty database name error

2005-06-06 Thread mfatene
variable basedir else change a param. in what you have as file, stop start and see. Mathias Selon Ed Kasky [EMAIL PROTECTED]: I added the line to the configuration file and removed --log-error= line from startup line but it still creates the /usr/local/mysql/var/yoda2.err as well as

Re: mysql UNION

2005-06-06 Thread mfatene
Hi, If we forget the first method which i mis-adviced, i can give a third which is generic. suppose that you have an indexed type column on each table (what i did). You can work with 3 variables. If they are different, you query for a join, if they are equal, you transform the join to a simple

Re: mysql UNION

2005-06-05 Thread mfatene
The second method is dynamic sql with prepare statement from string. It's better for the reason that the query is generated to retrieve data from just one table (not an union which implies 3 tables). The day your tables will be huge, i'm sure you will use the second method. two crazy people can

Re: Slow LIMIT Query

2005-06-05 Thread mfatene
Hi, i and i think all people will think the same : i can't help. why ? have you described your tables ? have your given the size of each table ? have you list the indexes ? have you specify the storage type ? and have you given the query ? if you're looking for just a theoritical response,

Re: LOAD DATA INFILE - what is the path to file?

2005-06-05 Thread mfatene
Hi, load data infile tries to load data from specified directory on the server. if your file is on the client, try LOAD DATA LOCAL and verify the parameter --enable-local-infile more details are in http://dev.mysql.com/doc/mysql/en/load-data-local.html about data on the web server. Nota bene :

Re: Slow LIMIT Query

2005-06-05 Thread mfatene
But i give you a suggestion (theoritical) : if data are reverse sorted , LIMIT 18, 10 will be LIMIt 2, 10 who knows ? Mathias Selon [EMAIL PROTECTED]: Hi, i and i think all people will think the same : i can't help. why ? have you described your tables ? have your given the size

Re: mysql UNION

2005-06-05 Thread mfatene
I agree with you, just see that if .. sql = SELECT id, '$cat' AS type, ... FROM $cat; is exactly what is done in prepare statement. dynamic sql is better than application level statement preparation, when you use stored procedure. but since this is the a habit in mysql, i'll keep this for oracle,

Re: How to find random records in a subset?

2005-06-04 Thread mfatene
select LIMIT 50; mathias Selon Brian Dunning [EMAIL PROTECTED]: I am using a routine to find 50 random records in a large MySQL database (about a million records) where I generate a list of 50 random unique ID's, and then use MySQL's in command to find them. I can't use order by rand()

Re: Design of a Client-side MySQL Java Load Balancer

2005-06-04 Thread mfatene
image ? you're modifying row n, node x wants to modify it, you need a rollback segment for that ! which value node x will read. i'm considering every DML is a transaction in an RDBMS, so when you say that you don't use transactions, you miss something. about load balancing, how do you track long

Re: mysql UNION

2005-06-04 Thread mfatene
Hi Sebastian; There is always crazy things somewhere. I'll give you two methods for that : mysql select id,'news' as selected, type from news - union select id,'faq' as selected, type from faq - union select id,'forum' as selected, type from forum; +--+--+---+ | id |

Re: max_seeks_for_key in InnoDB

2005-06-03 Thread mfatene
Hi, you can use a hint to force specific index usage : http://lib.hutech.edu.vn/ebookonline/ebook1/0596003064/hpmysql-CHP-5-SECT-4.html But this is not a good idea since data change and index selectivity can become bad. Also, if the index scan + the table scan is bigger than a full table scan,

Re: How to get the name of the last failed FK constraint

2005-06-02 Thread mfatene
Hi, Status; gives your own session id. To be combined to show innodb status (ksh or perl). Mathias Selon Frank Schröder [EMAIL PROTECTED]: [EMAIL PROTECTED] wrote: Frank Schröder [EMAIL PROTECTED] wrote on 05/31/2005 03:18:11 AM: Hello, I have an InnoDB table running on MySQL 4.1.11

Re: Select MAX(column1,column2)

2005-06-02 Thread mfatene
Hi Scott, you may be int his case : http://bugs.php.net/bug.php?id=32882 can't reproduce it because of env lack Mathias Selon Scott Klarenbach [EMAIL PROTECTED]: You guys have been so helpful with this, I'm hoping that I can ask for one more favor... The reason I needed the greatest(max())

Re: Design of a Client-side MySQL Java Load Balancer

2005-06-02 Thread mfatene
Hi, i think that client load-balacer are more Dispatchers than real load balancer. load balancing in the database side takes care to number of connections, but also node load. So thisis more real. But this issue is difficult. even for oracle with 9iRAC and 10gRAC, load balancing is not

Re: Find the biggest blobs

2005-06-02 Thread mfatene
Hi, since reading blobs is not a simple action (heavy), you must store the size of every file in the table's structure. if you write with php, somthing like that filesize($binFile) gives you the column value for every insert When done, a simple order by filesize gives you what you want before

Re: mysqldump : Character set '#33' is not a compiled character set

2005-06-02 Thread mfatene
hi, look at : usr/bin/mysqldump --defaults-extra-file=/.../backup-credentials.cnf in http://dev.mysql.com/doc/mysql/en/mysqldump.html add the port, protocol,password mathias Selon Gu Lei [EMAIL PROTECTED]: Hi It's my first time using mysqldump. [EMAIL PROTECTED] mysql]$ mysqldump -uroot

Re: Mysqldump

2005-06-02 Thread mfatene
Hi, try stop server, cold copy to dev server, start on dev. mathias Selon ManojW [EMAIL PROTECTED]: Greetings, I took a dump of (pretty chunk) database, the output is close to 45G. I am trying to reload this dump file onto a development server but it's taking long time to load the

Re: LEFT JOIN changes order of results

2005-06-02 Thread mfatene
hi, mls_num is not in a key, have you tried index creation on (zip,price desc,mls_num) ? mathias Selon Scott Gifford [EMAIL PROTECTED]: Johan Höök [EMAIL PROTECTED] writes: Hi Scott, I think you've been lucky so far... As you're only ordering on listdate, which is the same for both

Re: Need help in basic query

2005-06-02 Thread mfatene
Hi, Try just : SELECT id_secr_rqst task_id, MAX(dt_aud_rec) AS latest FROM isr2_aud_log WHERE name_rec_type = 'Assignment' AND id_secr_rqst ='TASK23C6054B9D416C08:1284FD4:103FB047DF1:-7ECF' GROUP BY id_secr_rqst ; ++-+ | task_id

Re: View

2005-06-02 Thread mfatene
NO Selon Jerry Swanson [EMAIL PROTECTED]: Does Mysql 4 supports views? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives:

Re: SELECT problem

2005-06-02 Thread mfatene
Hi René, thsi can be a solution, many others are possible : mysql select distinct the_date, person_id, cost, name - from trips,persons - where person_id=persons.id - and the_date in(select max(the_date) from trips a - where a.person_id=person_id - group by person_id) -

Re: LEFT JOIN changes order of results

2005-06-02 Thread mfatene
you can also try to increase the value of the tmp_table_size variable. A+ Selon [EMAIL PROTECTED]: You have a sort because you did an order by. If you had an index with the desired order by, it may be used. Try as you usage of covering indexes. you certainly know that one multi-column

Re: How to get the name of the last failed FK constraint

2005-06-02 Thread mfatene
I say this : Enter password: *** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 4.1.11-nt-max-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql status -- mysql Ver 14.7 Distrib 4.1.11, for Win32

Re: LEFT JOIN changes order of results

2005-06-02 Thread mfatene
You have a sort because you did an order by. If you had an index with the desired order by, it may be used. Try as you usage of covering indexes. you certainly know that one multi-column index is similar to a lot of multi-column others when desired columns are in the right position of columns

Re: Import dump (4.0 4.1) and collation problem

2005-06-01 Thread mfatene
hi, your config supports european charcters : mysql select * from tst; +--+---+ | a| txt | +--+---+ |1 | Ceci est un test en Français

Re: building php, using mysql for apache2

2005-06-01 Thread mfatene
hi, have you installed php4-mysql ? look at http://www.coagul.org/article.php3?id_article=169 for example. Mathias Selon bruce [EMAIL PROTECTED]: hi... trying to build php4 with mysql4.1-12, for use in apache2. i have the following ./compile that works for php5. however, when i try to use

  1   2   3   >