to build a vocabulary

2007-03-27 Thread pol
Would you suggest mysql to build a vocabulary?
Any examples?

thank you 

Pol


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



files in the same directory.

2007-03-27 Thread Ananda Kumar

Hi All,
I have specified innodb_file_per_table option, can i place .idb and and
tablespace (datafiles) in the same directory.
Also, can i please .idb files in different disk from innodb_data_file_path.

regards
anandkl


Re: Why doesn't the InnoDB count() match table status?

2007-03-27 Thread Maciej Dobrzanski
In news:[EMAIL PROTECTED],
Daevid Vincent [EMAIL PROTECTED] wrote:

 Because we're a huge enterprise product, with 3 databases of  200
 tables each.

 We are migrating from MYISM to INNODB and keeping track of that value
 isn't something we thought we'd need to do. Plus it seems like
 something we _shouldn't_ have to do. That's WHY we use a database.

Have you done any research regarding the effects of changes you are making? 
For example, how those two engines differ one from another, what the 
strenghts and weaknesses of either engine? I think not. If you did, you 
wouldn't be surprised by the easiest to spot difference in behaviour between 
MyISAM and InnoDB (and there are plenty more). RDBMS is not an Office 
spreadsheet, you cannot simply change software as from OpenOffice Calc to MS 
Excel and expect everything will work the same. The migration can be done 
with positive effects, but require knowledge of both products.

Maciek



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Why doesn't the InnoDB count() match table status?

2007-03-27 Thread Tim Lucia
 -Original Message-
 From: Maciej Dobrzanski [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 27, 2007 6:46 AM
 To: mysql@lists.mysql.com
 Subject: Re: Why doesn't the InnoDB count() match table status?
 
 MyISAM and InnoDB (and there are plenty more). RDBMS is not an Office
 spreadsheet, you cannot simply change software as from OpenOffice Calc to
 MS
 Excel and expect everything will work the same. The migration can be done

You can and ought to be able to expect it.  After all, SQL is a standard.
It's a crying shame that so many 'feature' creep in for seemingly the sole
purpose of hooking you on that vendor's platform.

Of course you'd be naïve to believe it, but nothing is wrong with the
expectation.

IMO, of course

Tim

 
 Maciek



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



FYI - SQLyog527 fixes recent AV false positive

2007-03-27 Thread Tim Lucia
FYI - Monday AM, Norton A/V started reporting the uninst.exe and the
sqlyog525.exe files as infected with 'Virus Burst'.  This is due to a
NullSoft installer signature problem.  SQLyog527 has been released, built
with a newer NullSoft installer, AND the virus definitions from today no
longer quarantine the files from 5.25

 

 

 

Tim

 



HPUX out of memory errors - kernel tuning?

2007-03-27 Thread Ian Collins

Hi,
I have a HP rp3410 with 4Gb RAM running HPUX 11.11. This is running,

Version: '5.0.26-pro-log'  socket: '/tmp/mysql.sock'  port: 3306  MySQL 
Pro (Commercial)


When this machine is put under load (i.e, a lot of database activity), 
the clients are receiving Error 12 errors and the MySQL log has a lot 
of errors as follows,


070327  8:24:20 [ERROR] mysql_ha_read: Got error 12 when reading table 
'XLDEFN_IN'
070327  8:54:51 [ERROR] mysql_ha_read: Got error 12 when reading table 
'XLDEFN_IN'
070327  8:55:19 [ERROR] mysql_ha_read: Got error 12 when reading table 
'XLDEFN_IN'


In addition, I see at MySQL startup (in the mysql err log), a number of,

/usr/local/mysql/bin/mysqld: Out of memory (Needed 368389120 bytes)
/usr/local/mysql/bin/mysqld: Out of memory (Needed 276289536 bytes)


My /etc/my.cnf is set as,

[client]
port=3306
socket=/tmp/mysql.sock

[mysqld]
port=3306
socket=/tmp/mysql.sock
set-variable = key_buffer_size=400M
set-variable = max_allowed_packet=15M
default-table-type=InnoDB
datadir=/data/mysql

The machine is indicating it is under any ram pressure, which makes me 
think it may be kernel tuning (of course, I may be wrong). Are there any 
recommendations for HPUX kernel tuning with MySQL?


--

Regards,
Ian Collins
Systems Manager
KIWIPLAN Group
Tel: +64 (0)9 2727622
Mob: +64 (0)21 761144



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Describe question

2007-03-27 Thread Olaf Stein
Hi All,

Is there a way to influence the order in which columns are returned in a
describe table statement. Basically I want the same order that I get in the
mysql client (Field, Type, Null, etc) in a little script I am writing, so I
can use the Column headers dynamically.

Thanks
Olaf


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Using replace with New Lines

2007-03-27 Thread Lucas . CTR . Heuman
Hello Group,

Looking to use this REPLACE to strip multi line data out of my return 
data. 

I am having problems getting the \n to work correctly, any ideas?

REPLACE(DESCRIPTION,\n,' ')


SELECT
  rpad(CASE WHEN DESCRIPTION IS NULL THEN '' ELSE 
REPLACE(DESCRIPTION,'\n',' ')  END,80,' ') as var
 FROM hardware;



Wishing you the best you know you deserve,

__
Lucas Heuman
CM Web Developer
SRA International, Inc.
FAA, WJHTC/Bldg 300, 2nd Fl., H33
Atlantic City Int'l Airport, NJ  08405
Phone 609.485.5401

Re: Describe question

2007-03-27 Thread Rolando Edwards
Instead of just saying 'desc tbl-name;'
Try using information_schema.columns

mysql desc information_schema.columns;
+--+--+--+-+-+---+
| Field| Type | Null | Key | Default | Extra |
+--+--+--+-+-+---+
| TABLE_CATALOG| varchar(512) | YES  | | NULL|   |
| TABLE_SCHEMA | varchar(64)  | NO   | | |   |
| TABLE_NAME   | varchar(64)  | NO   | | |   |
| COLUMN_NAME  | varchar(64)  | NO   | | |   |
| ORDINAL_POSITION | bigint(21)   | NO   | | 0   |   |
| COLUMN_DEFAULT   | varchar(64)  | YES  | | NULL|   |
| IS_NULLABLE  | varchar(3)   | NO   | | |   |
| DATA_TYPE| varchar(64)  | NO   | | |   |
| CHARACTER_MAXIMUM_LENGTH | bigint(21)   | YES  | | NULL|   |
| CHARACTER_OCTET_LENGTH   | bigint(21)   | YES  | | NULL|   |
| NUMERIC_PRECISION| bigint(21)   | YES  | | NULL|   |
| NUMERIC_SCALE| bigint(21)   | YES  | | NULL|   |
| CHARACTER_SET_NAME   | varchar(64)  | YES  | | NULL|   |
| COLLATION_NAME   | varchar(64)  | YES  | | NULL|   |
| COLUMN_TYPE  | longtext | NO   | | |   |
| COLUMN_KEY   | varchar(3)   | NO   | | |   |
| EXTRA| varchar(20)  | NO   | | |   |
| PRIVILEGES   | varchar(80)  | NO   | | |   |
| COLUMN_COMMENT   | varchar(255) | NO   | | |   |
+--+--+--+-+-+---+
19 rows in set (0.00 sec)

The ORDINAL_POSITION column tells you the order by which a column is listed.

Try doing this:

SELECT ordinal_position,column_name from information_schema.columns
where table_schema = '...' and table_name = '...' order by ordinal_position;

You could coerce the order to be whatever you want it to be.
But, this should be a good starting for you. Have fun with it !!!


- Original Message -
From: Olaf Stein [EMAIL PROTECTED]
To: MySql mysql@lists.mysql.com
Sent: Tuesday, March 27, 2007 10:15:47 AM (GMT-0500) Auto-Detected
Subject: Describe question

Hi All,

Is there a way to influence the order in which columns are returned in a
describe table statement. Basically I want the same order that I get in the
mysql client (Field, Type, Null, etc) in a little script I am writing, so I
can use the Column headers dynamically.

Thanks
Olaf


-- 
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: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Availability of 5.1 as production release ?

2007-03-27 Thread Colin Charles

Ulrich Staudinger wrote:


first of all, thanks for the world's finest open source database!
I would like to know if someone has an estimate for the availability of 
v5.1 as a production release. ?


Keep watching http://dev.mysql.com/doc/refman/5.1/en/news.html and its a 
safe bet if its Q3/Q4 this year, I believe


--
Colin Charles, Community Engineer
MySQL AB, Melbourne, Australia, www.mysql.com
Mobile: +614 12 593 292 / Ekiga/Skype: colincharles
Web: http://www.bytebot.net/blog/

MySQL Users Conference: http://www.mysqluc.com/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Using replace with New Lines

2007-03-27 Thread Lucas . CTR . Heuman
Ok.. I found the problem.. I needed to add a \r.. but now that opens up 
the question can I have a Multi replace search in replace?


Example can I do something like this in MySQL

REPLACE (STRING,'\r' or '\n',' ')


REPLACE(DESCRIPTION,'\r\n',' ')

Wishing you the best you know you deserve,

__





Hello Group,

Looking to use this REPLACE to strip multi line data out of my return 
data. 

I am having problems getting the \n to work correctly, any ideas?

REPLACE(DESCRIPTION,\n,' ')


SELECT
  rpad(CASE WHEN DESCRIPTION IS NULL THEN '' ELSE 
REPLACE(DESCRIPTION,'\n',' ')  END,80,' ') as var
 FROM hardware;



Wishing you the best you know you deserve,

__
Lucas Heuman
CM Web Developer
SRA International, Inc.
FAA, WJHTC/Bldg 300, 2nd Fl., H33
Atlantic City Int'l Airport, NJ  08405
Phone 609.485.5401


Re: Why doesn't the InnoDB count() match table status?

2007-03-27 Thread Jochem van Dieten

On 3/27/07, Tim Lucia wrote:

 -Original Message-
 From: Maciej Dobrzanski
 Sent: Tuesday, March 27, 2007 6:46 AM
 To: mysql@lists.mysql.com
 Subject: Re: Why doesn't the InnoDB count() match table status?

 MyISAM and InnoDB (and there are plenty more). RDBMS is not an Office
 spreadsheet, you cannot simply change software as from OpenOffice Calc to
 MS
 Excel and expect everything will work the same. The migration can be done

You can and ought to be able to expect it.  After all, SQL is a standard.


But the problem is not with the result of the query, but with the
speed. And the speed of an implementation is not standardized by the
ISO/IEC.

Jochem

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Using replace with New Lines

2007-03-27 Thread Stephen Cook
I always go with REPLACE(REPLACE(STRING, '\n', ''), '\r', ''), since 
depending on where your data came from there may be one or the other, or 
both.  Although if there is a shorthand/more efficient way I'd love to 
hear it.



[EMAIL PROTECTED] wrote:
Ok.. I found the problem.. I needed to add a \r.. but now that opens up 
the question can I have a Multi replace search in replace?



Example can I do something like this in MySQL

REPLACE (STRING,'\r' or '\n',' ')


REPLACE(DESCRIPTION,'\r\n',' ')

Wishing you the best you know you deserve,

__





Hello Group,

Looking to use this REPLACE to strip multi line data out of my return 
data. 


I am having problems getting the \n to work correctly, any ideas?

REPLACE(DESCRIPTION,\n,' ')


SELECT
  rpad(CASE WHEN DESCRIPTION IS NULL THEN '' ELSE 
REPLACE(DESCRIPTION,'\n',' ')  END,80,' ') as var

 FROM hardware;



Wishing you the best you know you deserve,

__
Lucas Heuman
CM Web Developer
SRA International, Inc.
FAA, WJHTC/Bldg 300, 2nd Fl., H33
Atlantic City Int'l Airport, NJ  08405
Phone 609.485.5401



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: improving performance of server

2007-03-27 Thread Jay Pipes
Could you post the actual code you are using for the INSERT?  Also, what 
storage engine are you using?


Jay

andrew collier wrote:

hello,

i am having some trouble getting mysql to perform decently on my machine. it is 
a 2 GHz dual core AMD 64 machine (although i am presently running a 32 bit 
linux system) with 1 Gb RAM and 1 Gb swap partition. the data i am using is 
loaded into a table described by:

CREATE TABLE IF NOT EXISTS strikes (
id  INT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
epoch   DATETIME,
usecMEDIUMINT UNSIGNED,
fdate   DOUBLE,
lat FLOAT(6,4),
lon FLOAT(7,4),
error   TINYINT UNSIGNED,
nstat   TINYINT UNSIGNED
);

the data itself is pretty big: 70082053 records.

during the loading process mysqlq pretty much hogs the CPU but uses only around 
5% of the RAM. it takes 13m50s to load the data. there is a lot of disk 
activity, but this is just reading the data and there is virtually no swap 
space in use.

adding the following index:

INDEX coords (lat,lon)

takes a really long time. once again the hard disk is working hard, but there 
is no swapping, so obviously this is just due to database reads. CPU usage is 
about the same. in the end after 60 hours i gave up: had to reboot to windows 
to do some other stuff. but it was just taking unreasonably long anyway.

i am pretty sure that a lot more of this processing could be done without that 
much disk activity and i am guessing that is what is slowing the whole process 
down. the configuration i have in my.cnf is:

[client]
port= 3306
socket  = /var/run/mysql/mysql.sock

[mysqld]
port= 3306
socket  = /var/run/mysql/mysql.sock
skip-locking
key_buffer = 32M
max_allowed_packet = 1M
table_cache = 4
sort_buffer_size = 128K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 64K

server-id   = 1

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[isamchk]
key_buffer = 8M
sort_buffer_size = 8M

[myisamchk]
key_buffer = 8M
sort_buffer_size = 8M

[mysqlhotcopy]
interactive-timeout

please could someone give me an idea of how i might go about making this whole 
thing a little more efficient? thanks!

best regards,
andrew collier.

--
Need cash? Click to get a payday loan
http://tags.bluebottle.com/fc/CAaCMPJktTdJ7Iu6tODsIDX46jYJlhKA/





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



a Linux -csh script to refresh test with production

2007-03-27 Thread Brown, Charles

Hello all.

Does anyone out there (in mysql world) have a Linux -csh script to
refresh test with production data.

My developers would like their test database to be refreshed nightly
with production data. The production and test mysql servers do not run
in the same box.  They run on different boxes. Therefore there is some
ftp or scp required

Thanks


This message is intended only for the use of the Addressee and
may contain information that is PRIVILEGED and CONFIDENTIAL.

If you are not the intended recipient, you are hereby notified
that any dissemination of this communication is strictly prohibited.

If you have received this communication in error, please erase
all copies of the message and its attachments and notify us
immediately.

Thank you.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: a Linux -csh script to refresh test with production

2007-03-27 Thread Rolando Edwards
If test and production are supposed to be identical, then use this:

mysqldump -hIP for Prod -u... -p... --triggers --routines db-name on Prod | 
mysql -hIP for Test -u... -p... -A -Ddb-name on Test

If you havn't noticed, you do not dump the data to a file and ftp or scp 
anything anywhere !!!
This will actually pipe all mysqldump commands striaght to the test database.

Make sure Linux can withstand the long connect time required.

If you want mysqldump all tables one at a time,
here is a Windows Batch File That I Use Every Week:

1) drop a target database,
2) recreate a target database,
3) Copy all stored procedures from Source to Target
4) Dynamically Create a Windows Batch File to mysqldump every table
(and its triggers, if applicable) starting with the largest table

Using this method, you need not worry about connection time because each table
will be shipped over from Source to Target using a Fresh Connection each time.

@echo off
set TABLESBAT=DynamicBatchFile.bat
echo SysData Full Copy Initiated  DataLoadFull.txt
date /t  DataLoadFull.txt
time /t  DataLoadFull.txt
rem
rem
rem Drop SysData_Test from Target
rem Create SysData_Test for Target
rem Load Stored Procedures from Host PROD_IP Database SysData_Prod into Host 
TEST_IP Database SysData_Test
rem
rem
set SOURCE_HOST=PROD_IP
set SOURCE_USER=...
set SOURCE_PASS=...
set TARGET_HOST=TEST_IP
set TARGET_USER=...
set TARGET_PASS=...
rem
rem
echo DROP DATABASE IF EXISTS SysData_Test;  ResetTarget.sql
echo CREATE DATABASE SysData_Test;  ResetTarget.sql
echo USE SysData_Test   ResetTarget.sql
mysqldump -h%SOURCE_HOST% -u%SOURCE_USER% -p%SOURCE_PASS% --no-data 
--no-create-info --routines NDW  ResetTarget.sql
rem
rem
rem mysqldump all MyISAM tables from Source to Target in Size Order starting 
from the Largest Table
rem
rem
mysql -h%SOURCE_HOST% -u%SOURCE_USER% -p%SOURCE_PASS% -A --skip-column-names 
-DNDW -eSELECT CONCAT('mysqldump -h%SOURCE_HOST% -u%SOURCE_USER% 
-p%SOURCE_PASS% --triggers SysData_Prod ',A.table_name,' | mysql 
-h%TARGET_HOST% -u%TARGET_USER% -p%TARGET_PASS% -A -DSysData_Test') FROM 
(SELECT table_name,(data_length+index_length) table_length FROM 
information_schema.tables WHERE table_schema='SysData_Prod' AND 
engine='MyISAM') A ORDER BY A.table_length DESC,A.table_name;  %TABLESBAT%
echo exit  %TABLESBAT%
mysql -h%TARGET_HOST% -u%TARGET_USER% -p%TARGET_PASS% -A  ResetTarget.sql
start mysqldumps from PROD to TEST, DO NOT CLOSE !!! /w %TABLESBAT%
del ResetTarget.sql
del %TABLESBAT%
echo SysData Full Completed  DataLoadFull.txt
date /t  DataLoadFull.txt
time /t  DataLoadFull.txt

PLEASE BE CAREFUL WITH THIS !!!

- Original Message -
From: Charles Brown [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Tuesday, March 27, 2007 3:17:46 PM (GMT-0500) Auto-Detected
Subject: a Linux -csh script to refresh test with production


Hello all.

Does anyone out there (in mysql world) have a Linux -csh script to
refresh test with production data.

My developers would like their test database to be refreshed nightly
with production data. The production and test mysql servers do not run
in the same box.  They run on different boxes. Therefore there is some
ftp or scp required

Thanks


This message is intended only for the use of the Addressee and
may contain information that is PRIVILEGED and CONFIDENTIAL.

If you are not the intended recipient, you are hereby notified
that any dissemination of this communication is strictly prohibited.

If you have received this communication in error, please erase
all copies of the message and its attachments and notify us
immediately.

Thank you.


--
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: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: a Linux -csh script to refresh test with production

2007-03-27 Thread Bessares, Bob

well, you'd want to come up with your specifics but it's pretty simple using 
ssh...
put this is your shell...

$ mysqldump db-name | mysql -h remote.box.com db-name

$ mysqldump db-name | ssh [EMAIL PROTECTED] mysql db-name

$ mysqldump db-name foo | ssh [EMAIL PROTECTED] mysql bar

hope this helps
bb


-Original Message-
From: Brown, Charles [mailto:[EMAIL PROTECTED]
Sent: Tue 3/27/2007 12:17 PM
To: mysql@lists.mysql.com
Subject: a Linux -csh script to refresh test with production
 

Hello all.

Does anyone out there (in mysql world) have a Linux -csh script to
refresh test with production data.

My developers would like their test database to be refreshed nightly
with production data. The production and test mysql servers do not run
in the same box.  They run on different boxes. Therefore there is some
ftp or scp required

Thanks


This message is intended only for the use of the Addressee and
may contain information that is PRIVILEGED and CONFIDENTIAL.

If you are not the intended recipient, you are hereby notified
that any dissemination of this communication is strictly prohibited.

If you have received this communication in error, please erase
all copies of the message and its attachments and notify us
immediately.

Thank you.


-- 
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: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



proximity query help.

2007-03-27 Thread fenlon

Here is my problem.
I have a table called dictionary
The dictionary has the following columns

`wordID` int(10) unsigned NOT NULL auto_increment,
`position` int(10) unsigned NOT NULL ,
 `WORD` varchar(120) NOT NULL default ''

What this actually holds is a index of words and their locations of a body
of text. The position is just the word number in the paragraph. So, using
this text, it would contain

Position,   word
1, What
2, This
3, Actually
4, Holds
…
9, words
…
12, locations
…
19, locations
…
23, word

I am attempting to do a search upon this dictionary with several keywords,
but the catch is, for a hit to be relevant, the words must be within a
certain range from each other (lets say six positions)

So I need some kind of search for keyword1 and keyword2, where
keyword1.position BETWEEN keyword2.position-6 AND keyword2.position+6 and I
would like it to return a set containing the positions. I would like to do
this with only database operations and use as little post processing as
possible.

I am using mySQL 4.1.18

I have come across creating temporary tables, which look like they may lead
to a solution.

CREATE TEMPORARY TABLE keyword1
SELECT*
FROM dictionary
WHERE `WORD` LIKE  'word%';

CREATE TEMPORARY TABLE keyword2
SELECT*
FROM dictionary
WHERE `WORD` LIKE  ‘location%’;

And here is where I get lost. I guess I need to build a third table
containing a column for keyword1 Position and a column for keyword 2
position where the two positions are within a the specified range of each
other.

**I know the following will not work, but it may help to illustrate what
results I need

SELECT keyword1.position, keyword2.position
FROM
(SELECT position FROM keyword1)
UNION
(SELECT position FROM keyword2)
WHERE keyword1.position BETWEEN 
Keyword2.position-6
AND
Keyword2.position+6

This should return all instances where keyword1 is within 6 position ranges
of keyword2. SO using the example text and data above, it should return

Keyword1.position, keyword2.position
9, 12
23,19


As you can see, I have no idea of what I am doing at this point, so any help
would be much appreciated. Thank you.

-- 
View this message in context: 
http://www.nabble.com/%22proximity%22-query-help.-tf3476131.html#a9702908
Sent from the MySQL - General mailing list archive at Nabble.com.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: how to match all words

2007-03-27 Thread fenlon

Pat,
I am by no means great with sql, but i think i may be able to help you. You
just need to load up your query with or statements. As i understand your
question, you will be searching name for several keywords (x1,x2,...)  and
address for several keywrods (y1,y2...) 


SELECT * FROM clients
WHERE
name LIKE '%x1%'
OR 
name LIKE '%x2%'
AND
address LIKE '%y1%'
OR
address LIKE '%y2%'

This should return all records with names similar to x1 or x2 with address
similar to y1 or y2.



Patrick Aljord wrote:
 
 Hey all,
 I have a table 'clients' like this:
 id int(5),
 name varchar(55),
 address varchar(55)
 
 I would like to select all the records that have '%x%' and '%y%' but
 '%x%' can be in name and '%y%' can be in address. Also in my query
 there are generally more words to match (x,y,z,t etc) and I can't use
 full text search. Any what's the best way to do this?
 
 Thanx in advance
 
 Pat
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/how-to-match-all-words-tf3412448.html#a9705200
Sent from the MySQL - General mailing list archive at Nabble.com.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



what can cause a query to be much slower the second time?

2007-03-27 Thread Don Cohen

This is using version: 5.0.18-log on linux.
I have a stored procedure that takes .2 sec the first time,
12 the second, 12 the third.  The data is unchanged.  
The relevant part of the procedure looks like this.

 ...
 drop temporary table if exists temptab;
 create temporary table temptab (index (id))
  (SELECT id, col1, ... FROM table1);
 set @sql = concat(SELECT , cols, -- cols is an input string
FROM table2 LEFT JOIN table3 on
  table2.id = table3.col2
 left join temptab
 ON temptab.id=table3.col3
WHERE table2.col4=, quote(anotherinput),
ORDER by col5);
 PREPARE stmt FROM @sql;
 EXECUTE stmt;
 DEALLOCATE PREPARE stmt;

I doubt that the exact form of the query makes much difference.
In fact, the same thing happens with two different queries I
tried, but both using a temporary table built just before the 
query.  That was intended to improve performance - and did the
first time.

It's not that dropping and creating the table is expensive.
I can do that over and over again in approximately 0 sec.

Any ideas?

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



mysql services to monitor.

2007-03-27 Thread Ananda Kumar

Hi All,
What are all the mysql services i need to monitor to make sure mysql db is
running and send a pager when any one of these services go down.

regards
anandkl


Re: mysql services to monitor.

2007-03-27 Thread Michael Raven


Ananda Kumar wrote:
 
 What are all the mysql services i need to monitor to make sure mysql db is
 running and send a pager when any one of these services go down.
 
mysql daemon on Linux and UNIX systems, MySQL service on Windows
in any case all of them supports executing command on daemon (system
service) failure.
that command may execute script or program that will communicate with your
pager service provider
-- 
View this message in context: 
http://www.nabble.com/mysql-services-to-monitor.-tf3477057.html#a9707499
Sent from the MySQL - General mailing list archive at Nabble.com.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]