Re: LIKE sql optimization

2014-02-12 Thread Jesper Wisborg Krogh
will try to reduce the amount of random I/O. In some cases though, you may see the index scan be preferred. Assume you have a query like: SELECT val FROM table WHERE condition LIKE '%abcd'; and you have an index (condition, val) or (val, condition) then the whole query can be satisfied from

RE: LIKE sql optimization

2014-02-12 Thread Zhigang Zhang
Done. Thand you very much! Zhigang _ From: Jesper Wisborg Krogh [mailto:my...@wisborg.dk] Sent: Wednesday, February 12, 2014 5:30 PM To: Morgan Tocker; Zhigang Zhang Cc: mysql@lists.mysql.com Subject: Re: LIKE sql optimization On 12/02/2014 13:16, Morgan Tocker wrote: Hi

LIKE sql optimization

2014-02-11 Thread Zhigang Zhang
For example: Select * from T where col like ‘%abcd’; The table T is myisam table and we created a index on col. As we known, this like sql does not use the index created on col, it confuse me, why? I think in mysiam engine, the index data is smaller, it can use index link list

Re: LIKE sql optimization

2014-02-11 Thread Reindl Harald
Am 12.02.2014 02:23, schrieb Zhigang Zhang: For example: Select * from T where col like ‘%abcd’; The table T is myisam table and we created a index on col. As we known, this like sql does not use the index created on col, it confuse me, why? I think in mysiam engine, the index data

Re: LIKE sql optimization

2014-02-11 Thread Mathieu Desharnais
Sql database doesn't use index in like statement if it starts with % .. like 'abcd%' would work though... To use an index you can store your value using reverse function and index it .. then your like would use the index. 2014-02-11 20:23 GMT-05:00 Zhigang Zhang zzgang2...@gmail.com

RE: LIKE sql optimization

2014-02-11 Thread Zhigang Zhang
@lists.mysql.com Subject: Re: LIKE sql optimization Sql database doesn't use index in like statement if it starts with % .. like 'abcd%' would work though... To use an index you can store your value using reverse function and index it .. then your like would use the index. 2014-02-11 20:23

Re: LIKE sql optimization

2014-02-11 Thread kitlenv
Desharnais [mailto:mdesharn...@diffusion.cc] Sent: Wednesday, February 12, 2014 9:41 AM To: Zhigang Zhang; mysql@lists.mysql.com Subject: Re: LIKE sql optimization Sql database doesn't use index in like statement if it starts with % .. like 'abcd%' would work though... To use an index you

Re: LIKE sql optimization

2014-02-11 Thread Reindl Harald
better performance than to scan the whole table data. From: Mathieu Desharnais [mailto:mdesharn...@diffusion.cc] Sent: Wednesday, February 12, 2014 9:41 AM To: Zhigang Zhang; mysql@lists.mysql.com Subject: Re: LIKE sql optimization Sql database doesn't use index in like statement

Re: LIKE sql optimization

2014-02-11 Thread louis liu
Subject: Re: LIKE sql optimization Sql database doesn't use index in like statement if it starts with % .. like 'abcd%' would work though... To use an index you can store your value using reverse function and index it .. then your like would use the index. 2014

Re: LIKE sql optimization

2014-02-11 Thread Mathieu Desharnais
Same reason as why composite index works only if you supply first field or fields .. example index on a,b,c if you have a query : select * from tbl where a = 'whatever' and b = 'something it will use the index .. but a query like this one : select * from tbl where b = 'something' and c

RE: LIKE sql optimization

2014-02-11 Thread Zhigang Zhang
I checked a myisam table index, the index is a copy of the whole field. Zhigang -Original Message- From: Reindl Harald [mailto:h.rei...@thelounge.net] Sent: Wednesday, February 12, 2014 10:02 AM To: mysql@lists.mysql.com Subject: Re: LIKE sql optimization because a index

Re: LIKE sql optimization

2014-02-11 Thread Morgan Tocker
Hi Zhigang, On Feb 11, 2014, at 8:48 PM, Zhigang Zhang zzgang2...@gmail.com wrote: I want to know the reason, in my opinion, to scan the smaller index data has better performance than to scan the whole table data. I think I understand the question - you are asking why MySQL will not index

RE: LIKE sql optimization

2014-02-11 Thread Zhigang Zhang
Thank you very much! Zhigang -Original Message- From: Morgan Tocker [mailto:morgan.toc...@oracle.com] Sent: Wednesday, February 12, 2014 10:16 AM To: Zhigang Zhang Cc: mysql@lists.mysql.com Subject: Re: LIKE sql optimization Hi Zhigang, On Feb 11, 2014, at 8:48 PM

RE: [Suspected Spam][Characteristics] RE: Slow Response -- What Does This Sound Like to You?

2013-05-10 Thread Robinson, Eric
STATUS, EXPLAIN for all of them. :-) The query in question is always some variation of the following. From looking at this, which table(s) would you like to see this information for? # Time: 130507 18:14:26 # User@Host: site150_DbUser[site150_DbUser] @ cognos08.mycharts.md [192.168.10.85

RE: Slow Response -- What Does This Sound Like to You?

2013-05-10 Thread Rick James
Subject: RE: [Suspected Spam][Characteristics] RE: Slow Response -- What Does This Sound Like to You? 1. MyISAM locks _tables_. That can cause other connections to be blocked. Solution: switch to InnoDB. Caution: There are a few caveats when switching; see https://kb.askmonty.org/en

RE: Slow Response -- What Does This Sound Like to You?

2013-05-09 Thread Rick James
1:58 PM To: mysql@lists.mysql.com Subject: Slow Response -- What Does This Sound Like to You? We have a situation where users complain that the system periodically freezes for 30-90 seconds. We check the slow query logs and find that one user issued a complex query that did indeed take 30-90

RE: Slow Response -- What Does This Sound Like to You?

2013-05-09 Thread Robinson, Eric
-Original Message- From: Robinson, Eric [mailto:eric.robin...@psmnv.com] Sent: Thursday, May 09, 2013 1:58 PM To: mysql@lists.mysql.com Subject: Slow Response -- What Does This Sound Like to You? We have a situation where users complain that the system periodically

Re: Slow Response -- What Does This Sound Like to You?

2013-05-09 Thread Johnny Withers
I delt with a similar situation where users complained the system would freeze up for 30-60 seconds at random intervals. After days of looking at queries, logs, error logs, etc.. We were no closer to finding a solution. We do have a service that runs every 15 minutes to cache some data in our

Re: Slow Response -- What Does This Sound Like to You?

2013-05-09 Thread Denis Jedig
Am 09.05.2013 22:58, schrieb Robinson, Eric: Q: What conditions could cause single query to lock up a database for a while for all users From http://docs.oracle.com/cd/E17952_01/refman-5.5-en/table-locking.html : A SELECT statement that takes a long time to run prevents other sessions

RE: Slow Response -- What Does This Sound Like to You?

2013-05-09 Thread Wm Mussatto
On Thu, May 9, 2013 15:25, Robinson, Eric wrote: -Original Message- From: Robinson, Eric [mailto:eric.robin...@psmnv.com] Sent: Thursday, May 09, 2013 1:58 PM To: mysql@lists.mysql.com Subject: Slow Response -- What Does This Sound Like to You? We have a situation where

RE: Slow Response -- What Does This Sound Like to You?

2013-05-09 Thread Robinson, Eric
-Original Message- From: Wm Mussatto [mailto:mussa...@csz.com] Sent: Thursday, May 09, 2013 3:50 PM To: Robinson, Eric Cc: Rick James; mysql@lists.mysql.com Subject: RE: Slow Response -- What Does This Sound Like to You? On Thu, May 9, 2013 15:25, Robinson, Eric wrote

Re: Slow Response -- What Does This Sound Like to You?

2013-05-09 Thread shawn green
Hello Eric, On 5/9/2013 7:13 PM, Robinson, Eric wrote: -Original Message- From: Wm Mussatto [mailto:mussa...@csz.com] Sent: Thursday, May 09, 2013 3:50 PM To: Robinson, Eric Cc: Rick James; mysql@lists.mysql.com Subject: RE: Slow Response -- What Does This Sound Like to You? On Thu

Re: Slow Response -- What Does This Sound Like to You?

2013-05-09 Thread Bruce Ferrell
On 05/09/2013 03:25 PM, Robinson, Eric wrote: -Original Message- From: Robinson, Eric [mailto:eric.robin...@psmnv.com] Sent: Thursday, May 09, 2013 1:58 PM To: mysql@lists.mysql.com Subject: Slow Response -- What Does This Sound Like to You? We have a situation where users complain

RE: Slow Response -- What Does This Sound Like to You?

2013-05-09 Thread Rick James
: Re: Slow Response -- What Does This Sound Like to You? On 05/09/2013 03:25 PM, Robinson, Eric wrote: -Original Message- From: Robinson, Eric [mailto:eric.robin...@psmnv.com] Sent: Thursday, May 09, 2013 1:58 PM To: mysql@lists.mysql.com Subject: Slow Response -- What Does

RE: Slow Response -- What Does This Sound Like to You?

2013-05-09 Thread Vikas Shukla
. Regards Vikas shukla -Original Message- From: Rick James rja...@yahoo-inc.com Sent: ‎10-‎05-‎2013 07:24 To: Bruce Ferrell bferr...@baywinds.org; mysql@lists.mysql.com mysql@lists.mysql.com Subject: RE: Slow Response -- What Does This Sound Like to You? 1. MyISAM locks _tables_. That can

Re: Still struggling witn like 'CTV%' over varchar.... I simple cannot understand..

2012-11-28 Thread Johan De Meersman
- Original Message - From: Andrés Tello mr.crip...@gmail.com showed the usage of the index, then, some time later, it show, for the same query, the usage of no index... Look at the rows field. It's obvious that this table is live and rather on the active side; and the data has

Still struggling witn like 'CTV%' over varchar.... I simple cannot understand..

2012-11-27 Thread Andrés Tello
mysql explain select * from cuenta where rutaCuenta like 'CTV%'; ++-++---+---++-+--++-+ | id | select_type | table | type | possible_keys | key| key_len | ref | rows | Extra

Re: 'myisam_use_mmap' unstable like hell

2011-12-15 Thread Reindl Harald
Am 15.12.2011 08:47, schrieb Rob Wultsch: To be brutally honest, if you want stability you should not be using MyISAM this is bullshit without 'myisam_use_mmap' i never saw mysqld crashing in the past 10 years, independent of the storage engine much less a not particularly commonly used

Re: 'myisam_use_mmap' unstable like hell

2011-12-15 Thread Andrés Tello
When I had memory issues, with something relatively stable, mostly is due faulty ram... Can you use or less ram or change fisically the ram? On Thu, Dec 15, 2011 at 2:23 AM, Reindl Harald h.rei...@thelounge.netwrote: Am 15.12.2011 08:47, schrieb Rob Wultsch: To be brutally honest, if you

Re: 'myisam_use_mmap' unstable like hell

2011-12-15 Thread Reindl Harald
this is NOT a memory issue 'myisam_use_mmap' in mysqld is buggy since a long time http://bugs.mysql.com/bug.php?id=48726 we are speaking of a HP ProLiant DL 380G7 in a VMware-Cluster with 36 GB ECC-RAM while there are machines using InnoDB with 'large-pages' and some GB buffer_pool_size on the

Re: 'myisam_use_mmap' unstable like hell

2011-12-15 Thread Paul DuBois
On Dec 15, 2011, at 12:02 PM, Reindl Harald wrote: this is NOT a memory issue 'myisam_use_mmap' in mysqld is buggy since a long time http://bugs.mysql.com/bug.php?id=48726 This is fixed in 5.1.61, 5.5.20, 5.6.5: http://dev.mysql.com/doc/refman/5.6/en/news-5-6-5.html we are speaking of

Re: 'myisam_use_mmap' unstable like hell

2011-12-15 Thread Reindl Harald
/refman/5.6/en/news-5-6-5.html hopefully you understand that i do not trust here since it was buggy like hell more than two years and from one major-release to the next signature.asc Description: OpenPGP digital signature

Re: 'myisam_use_mmap' unstable like hell

2011-12-14 Thread Rob Wultsch
' unstable like hell Datum: Thu, 24 Nov 2011 09:20:28 +0100 Von: Reindl Harald h.rei...@thelounge.net Organisation: the lounge interactive design An: Mailing-List mysql mysql@lists.mysql.com introduced with 5.1 myisam_use_mmap leads in 5.5.18 after some days to table crashes - will this be ever

Fwd: 'myisam_use_mmap' unstable like hell

2011-11-24 Thread Reindl Harald
: 'myisam_use_mmap' unstable like hell Datum: Thu, 24 Nov 2011 09:20:28 +0100 Von: Reindl Harald h.rei...@thelounge.net Organisation: the lounge interactive design An: Mailing-List mysql mysql@lists.mysql.com introduced with 5.1 myisam_use_mmap leads in 5.5.18 after some days to table crashes

Using @ variables with LIKE,CONCAT

2011-05-11 Thread Hank
This used to work fine in Mysql 4.3, but no longer works in 5.5.8: set @txt='needle'; select * from table where field like CONCAT('%',@txt,'%'); --returns the null set. If I substitute like this: select * from table where field like '%needle%'; it works perfectly (and as it did in 4.x

Re: Using @ variables with LIKE,CONCAT

2011-05-11 Thread Richard Bensley
Hi, I just tried this on a schema I had laying about and it worked fine: mysql SET @dude='pilgrim'; Query OK, 0 rows affected (0.00 sec) mysql SELECT namefield FROM mytable WHERE namefield LIKE CONCAT('%',@dude,'%'); +---+ | name

RE: Join based upon LIKE

2011-05-05 Thread Jerry Schwartz
-Original Message- From: Nuno Tavares [mailto:nuno.tava...@dri.pt] Sent: Tuesday, May 03, 2011 6:21 PM To: mysql@lists.mysql.com Subject: Re: Join based upon LIKE Dear Jerry, I've been silently following this discussion because I've missed the original question. But from your last

Re: Join based upon LIKE

2011-05-03 Thread Johan De Meersman
in Spain 2 | Spain's Rain you'd get 1 | R500 1 | S150 2 | S150 2 | R500 From thereon, you can see that all the same words have been used - ignoring a lot of spelling errors like Spian. Obviously not a magic solution, but it's a start. - Original Message - From: Jerry Schwartz je

RE: Join based upon LIKE

2011-05-03 Thread Jerry Schwartz
-Original Message- From: Johan De Meersman [mailto:vegiv...@tuxera.be] Sent: Tuesday, May 03, 2011 5:31 AM To: Jerry Schwartz Cc: Jim McNeely; mysql mailing list; Johan De Meersman Subject: Re: Join based upon LIKE http://www.gedpage.com/soundex.html offers a simple explanation of what

Re: Join based upon LIKE

2011-05-03 Thread Johan De Meersman
- Original Message - From: Jerry Schwartz je...@gii.co.jp I'm not sure that I could easily build a dictionary of non-junk words, since The traditional way is to build a database of junk words. The list tends to be shorter :-) Think and/or/it/the/with/like/... Percentages

Re: Join based upon LIKE

2011-05-03 Thread shawn wilson
I'm actually enjoying this discussion because I have the same type of issue. However, I have done away with trying to do a full text search in favor of making a table with unique fields where all fields should uniquely identify the group. If I get a dupe, I can clean it up. However, like you

RE: Join based upon LIKE

2011-05-03 Thread Jerry Schwartz
seem like there's a ready solution. Fortunately our database is small, and most feeds are only a few hundred products. Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 E-mail: je...@gii.co.jp Web site: www.the

Re: Join based upon LIKE

2011-05-03 Thread Nuno Tavares
period such as a year or a quarter. I think we'd better pull the plug on this discussion. It doesn't seem like there's a ready solution. Fortunately our database is small, and most feeds are only a few hundred products. Regards, Jerry Schwartz Global Information Incorporated 195

RE: Join based upon LIKE

2011-05-02 Thread Jerry Schwartz
-Original Message- From: Johan De Meersman [mailto:vegiv...@tuxera.be] Sent: Sunday, May 01, 2011 4:01 AM To: Jerry Schwartz Cc: Jim McNeely; mysql mailing list Subject: Re: Join based upon LIKE - Original Message - From: Jerry Schwartz je...@gii.co.jp I shove those modified

Re: Join based upon LIKE

2011-05-01 Thread Johan De Meersman
- Original Message - From: Jerry Schwartz je...@gii.co.jp I shove those modified titles into a table and do a JOIN ON `prod_title` LIKE `wild_title`. Roughly what I meant with the shadow fields, yes - keep your own set of data around :-) I have little more to offer, then, I'm

Re: FW: Join based upon LIKE

2011-04-30 Thread Hal�sz S�ndor
of the two compared strings s length. On the other hand, a good implementation of LIKE costs the pattern s length added to all the strings against which it matches s length, a sum, not product, of lengths. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql

Re: FW: Join based upon LIKE

2011-04-30 Thread Hal�sz S�ndor
want. The obvious implementation takes as many steps as the product of the two compared strings s length. On the other hand, a good implementation of LIKE costs the pattern s length added to all the strings against which it matches s length, a sum, not product, of lengths. -- MySQL General

Re: Join based upon LIKE

2011-04-29 Thread Johan De Meersman
- Original Message - From: Jerry Schwartz je...@gii.co.jp [JS] This isn't the only place I have to deal with fuzzy data. :-( Discretion prohibits further comment. Heh. What you *really* need, is a LART. Preferably one of the spiked variety. A full-text index would work if I were

RE: Join based upon LIKE

2011-04-29 Thread Jerry Schwartz
-Original Message- From: Johan De Meersman [mailto:vegiv...@tuxera.be] Sent: Friday, April 29, 2011 5:56 AM To: Jerry Schwartz Cc: mysql mailing list Subject: Re: Join based upon LIKE - Original Message - From: Jerry Schwartz je...@gii.co.jp [JS] This isn't the only place I

RE: Join based upon LIKE

2011-04-29 Thread Jerry Schwartz
-Original Message- From: Jim McNeely [mailto:j...@newcenturydata.com] Sent: Thursday, April 28, 2011 6:43 PM To: Jerry Schwartz Subject: Re: Join based upon LIKE It just smells wrong, a nicer system would have you joining on ID's of some kind so that spelling wouldn't matter. I don't know

FW: Join based upon LIKE

2011-04-28 Thread Jerry Schwartz
No takers? -Original Message- From: Jerry Schwartz [mailto:je...@gii.co.jp] Sent: Monday, April 25, 2011 2:34 PM To: 'Mailing-List mysql' Subject: Join based upon LIKE I have to match lists of new publications against our database, so that I can replace the existing publications in our

Re: Join based upon LIKE

2011-04-28 Thread Johan De Meersman
-in ft indices, or an external one like Solr or something) and doing best-fit matches on the keywords of the title you're looking for. -- Bier met grenadyn Is als mosterd by den wyn Sy die't drinkt, is eene kwezel Hy die't drinkt, is ras een ezel -- MySQL General Mailing List For list archives

RE: Join based upon LIKE

2011-04-28 Thread Jerry Schwartz
-Original Message- From: Johan De Meersman [mailto:vegiv...@tuxera.be] Sent: Thursday, April 28, 2011 4:18 PM To: Jerry Schwartz Cc: mysql mailing list Subject: Re: Join based upon LIKE - Original Message - From: Jerry Schwartz je...@gii.co.jp No takers? Not willingly, no :-p

Join based upon LIKE

2011-04-25 Thread Jerry Schwartz
`, prod.prod_num AS `ID` FROM new_titles JOIN prod ON prod.prod_title LIKE (new_titles.new_title_like) AND prod.pub_id = @PUBID AND prod.prod_discont = 0 ORDER BY new_titles.new_title; == (I've written code that substitutes % for certain strings that I specify, and there is some trial and error

Problem filtering with a like expression

2011-03-21 Thread Johan De Taeye
I ran into this case where a like expression is not evaluated correctly if the pattern is an expression. The example below shows a case where *AAA* is not considered *like 'A' || '%'* Is this a known limitation? Or a bug? create table lookup ( name varchar(60) ); insert into lookup (name

Re: Problem filtering with a like expression

2011-03-21 Thread petya
Hi, || isn't the concatenation operator by default. If you want it to be set sql_mode=PIPE_AS_CONCAT. Otherwise, use the CONCAT() function instead of || operator. Peter Boros On 03/21/2011 11:51 AM, Johan De Taeye wrote: I ran into this case where a like expression is not evaluated

Re: Problem filtering with a like expression

2011-03-21 Thread Simcha Younger
On Mon, 21 Mar 2011 11:51:27 +0100 Johan De Taeye johan.de.ta...@gmail.com wrote: insert into lookup (name) values ('AAA'); select * from lookup where name like 'A%'; = 1 record returned. OK select * from lookup where name like 'A' || '%'; = returns nothing. INCORRECT! The query

RE: Problem filtering with a like expression

2011-03-21 Thread johan de taeye
After updating the SQL_MODE, it works as I expect. Thanks for your prompt replies! Johan -Original Message- From: petya [mailto:pe...@petya.org.hu] Sent: Monday, March 21, 2011 12:10 PM To: Johan De Taeye Cc: mysql@lists.mysql.com Subject: Re: Problem filtering with a like

SUM value like 10,23,15,10

2010-08-24 Thread Tompkins Neil
Hi In MySQL is it possible to SUM a field which contains like 10,23,15,10. The result I'd be looking for is 10 = count of 2 23 = count of 1 15 = count of 1 Cheers Neil

Re: SUM value like 10,23,15,10

2010-08-24 Thread Johan De Meersman
wrote: Hi In MySQL is it possible to SUM a field which contains like 10,23,15,10. The result I'd be looking for is 10 = count of 2 23 = count of 1 15 = count of 1 Cheers Neil -- Bier met grenadyn Is als mosterd by den wyn Sy die't drinkt, is eene kwezel Hy die't drinkt, is ras een

Re: SUM value like 10,23,15,10

2010-08-24 Thread Tompkins Neil
a group by that field and select the count() of it. On Tue, Aug 24, 2010 at 3:53 PM, Tompkins Neil neil.tompk...@googlemail.com wrote: Hi In MySQL is it possible to SUM a field which contains like 10,23,15,10. The result I'd be looking for is 10 = count of 2 23 = count of 1 15

Re: SUM value like 10,23,15,10

2010-08-24 Thread Johan De Meersman
by that field and select the count() of it. On Tue, Aug 24, 2010 at 3:53 PM, Tompkins Neil neil.tompk...@googlemail.com wrote: Hi In MySQL is it possible to SUM a field which contains like 10,23,15,10. The result I'd be looking for is 10 = count of 2 23 = count of 1 15 = count

Re: SUM value like 10,23,15,10

2010-08-24 Thread Tompkins Neil
Neil neil.tompk...@googlemail.com wrote: Hi In MySQL is it possible to SUM a field which contains like 10,23,15,10. The result I'd be looking for is 10 = count of 2 23 = count of 1 15 = count of 1 Cheers Neil -- Bier met grenadyn Is als mosterd by den wyn

Re: SUM value like 10,23,15,10

2010-08-24 Thread Johan De Meersman
The proper way to do this would indeed be a separate table that has (itemID, property, value) or something like that. On Tue, Aug 24, 2010 at 4:04 PM, Tompkins Neil neil.tompk...@googlemail.com wrote: The application is still being developed, so I will probably look at storing

Re: Seems like an easy query, but isn't to me. Help?

2010-08-20 Thread Jangita
On 20/08/2010 2:45 a, George Larson wrote: I hope I've come to right place, and I'm asking in the right way -- please accept my apologies if not. We have some dates missing and I need to populate those fields with dates from the record just before them. I've gotten this far: SELECT UUid,

Re: Seems like an easy query, but isn't to me. Help?

2010-08-20 Thread Shawn Green (MySQL)
On 8/19/2010 8:45 PM, George Larson wrote: I hope I've come to right place, and I'm asking in the right way -- please accept my apologies if not. We have some dates missing and I need to populate those fields with dates from the record just before them. I've gotten this far: SELECT UUid,

Seems like an easy query, but isn't to me. Help?

2010-08-19 Thread George Larson
I hope I've come to right place, and I'm asking in the right way -- please accept my apologies if not. We have some dates missing and I need to populate those fields with dates from the record just before them. I've gotten this far: SELECT UUid, MIN(DDenteredDate) minDate FROM UUtable JOIN

Re: [PHP] newbie sequel question: how do we search for multiple things on 1 field like:

2010-06-18 Thread Daniel Brown
On Fri, Jun 18, 2010 at 16:30, Dave deal...@gmail.com wrote: SELECT * FROM contacts WHERE state = 'CA' and   name = 'bob' or name = 'sam' or name = 'sara' We begin by asking on the right list (mysql@lists.mysql.com, CC'd by courtesy). You're on the right track though. Try a

Re: I would like to post on lists.mysql.com

2010-01-30 Thread Daniel Brown
On Sat, Jan 30, 2010 at 01:49, Vikram A vikkiatb...@yahoo.in wrote: Dear Admin, I would like to share and get inputs from experts on MYSQL Db. I request you to grant access to me. You may not have noticed, but you're already posting to the list. All you have to do is subscribe and you

Re: I would like to post on lists.mysql.com

2010-01-30 Thread Wagner Bianchi
...@yahoo.in wrote: Dear Admin, I would like to share and get inputs from experts on MYSQL Db. I request you to grant access to me. You may not have noticed, but you're already posting to the list. All you have to do is subscribe and you have full access. -- /Daniel P. Brown

I would like to post on lists.mysql.com

2010-01-29 Thread Vikram A
Dear Admin, I would like to share and get inputs from experts on MYSQL Db. I request you to grant access to me. Thank you Regards, Vikki A Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/

Re: Like Syntax

2009-12-07 Thread Johan De Meersman
Have you considered Reading The *Fine* Manual at http://dev.mysql.com/doc/#manual ? On Sat, Dec 5, 2009 at 4:59 PM, Victor Subervi victorsube...@gmail.comwrote: Hi; I remember vaguely how to do this but don't know how to google it: show tables like categories$; such that it will return

Like Syntax

2009-12-05 Thread Victor Subervi
Hi; I remember vaguely how to do this but don't know how to google it: show tables like categories$; such that it will return tables such as: categoriesProducts, categoriesPrescriptions, etc. TIA, Victor

Re: Like Syntax

2009-12-05 Thread Victor Subervi
On Sat, Dec 5, 2009 at 11:09 AM, Michael Dykman mdyk...@gmail.com wrote: show tables like 'categories%'; Thanks. V

Select clause using from and to (like rownum in Oracle)

2009-08-21 Thread Anoop kumar V
. I have found this to work except I am not sure how to pass a where clause for the rownum part: SELECT @rownum:=...@rownum+1 rownum, t.*FROM (SELECT @rownum:=0) r, user_approvers t I was trying something like: SELECT @rownum:=...@rownum+1 rownum, t.*FROM (SELECT @rownum:=0) r, user_approvers t

Re: Select clause using from and to (like rownum in Oracle)

2009-08-21 Thread Peter Brawley
to pass a where clause for the rownum part: SELECT @rownum:=...@rownum+1 rownum, t.*FROM (SELECT @rownum:=0) r, user_approvers t I was trying something like: SELECT @rownum:=...@rownum+1 rownum, t.*FROM (SELECT @rownum:=0) r, user_approvers t where r.rownum between 10, 20; or even SELECT @rownum

Select clause using from and to (like rownum in Oracle)

2009-08-21 Thread Anoop kumar V
; PB - Anoop kumar V wrote: Thanks very much Peter. But I think I did figure that much. What I am lacking is the integration of that logic into the sql. The current sql (made for oracle) is like this - I can change it all I want because of the sql map which is configurable

Re: How to use LIKE for detecting numbers with commas?

2009-07-07 Thread Colin Streicher
LIKE '%,8,%' ? Probably not as elegant as you were looking for, but it works :) Colin On Monday 06 July 2009 21:31:51 Highviews wrote: Hi, I have numbers separated with commas saved into a TEXT Field, for example: ROW1: 10,5,2,8, ROW2: 2,7,9,65 ROW3: 99,100,55,10,88, etc... Now i

Re: How to use LIKE for detecting numbers with commas?

2009-07-07 Thread Highviews
: ROW1: 10,5,2,8, ROW2: 2,7,9,65 ROW3: 99,100,55,10,88, etc... Now i want to make a query like this: SELECT * FROM table where numbers LIKE '%8%'; Any solution to this? I only want exact numbers to be searched out. It's ugly, but this should work: SELECT * FROM

How to use LIKE for detecting numbers with commas?

2009-07-06 Thread Highviews
Hi, I have numbers separated with commas saved into a TEXT Field, for example: ROW1: 10,5,2,8, ROW2: 2,7,9,65 ROW3: 99,100,55,10,88, etc... Now i want to make a query like this: SELECT * FROM table where numbers LIKE '%8%'; The above query when executed returned the following: ROW1: 10,5,2,8

Re: How to use LIKE for detecting numbers with commas?

2009-07-06 Thread avrombay
It's ugly, but this should work: SELECT * FROM table where numbers LIKE '8,%' or numbers LIKE '%,8,%' or numbers LIKE '%,8' -- B - Original Message - From: Highviews highvi...@gmail.com To: mysql@lists.mysql.com Sent: Monday, July 06, 2009 6:31 PM Subject: How to use LIKE

Re: How to use LIKE for detecting numbers with commas?

2009-07-06 Thread Dan Nelson
In the last episode (Jul 06), avrom...@whyisitthat.com said: From: Highviews highvi...@gmail.com I have numbers separated with commas saved into a TEXT Field, for example: ROW1: 10,5,2,8, ROW2: 2,7,9,65 ROW3: 99,100,55,10,88, etc... Now i want to make a query like this: SELECT

Re: Select field with multiple values using LIKE

2009-03-24 Thread Johan De Meersman
AFAIK, repeated LIKEs. On Tue, Mar 24, 2009 at 6:24 AM, Yariv Omer yar...@jungo.com wrote: Hi when I am using a query for several field's values I am using the following query: Select field from table where in ('11', '22') I need to do a LIKE search (not exact match but like match) How

Select field with multiple values using LIKE

2009-03-23 Thread Yariv Omer
Hi when I am using a query for several field's values I am using the following query: Select field from table where in ('11', '22') I need to do a LIKE search (not exact match but like match) How can I do it Thanks, Yariv -- MySQL General Mailing List For list archives: http

like isn't behave as expected

2009-02-04 Thread Yariv Omer
Hi i have one row in the cpe_id column of the cpe_users table in my database with the value: d\d. when i am doing:select cpe_id from cpe_users where cpe_id = 'd\\d' I got the one result. when i am doing:select cpe_id from cpe_users where cpe_id like 'd\\d' I don't get any result! why

RE: like isn't behave as expected

2009-02-04 Thread Jerry Schwartz
-Original Message- From: Yariv Omer [mailto:yar...@jungo.com] Sent: Wednesday, February 04, 2009 10:50 AM To: mysql@lists.mysql.com Subject: like isn't behave as expected Hi i have one row in the cpe_id column of the cpe_users table in my database with the value: d\d. when i am

Re: like isn't behave as expected

2009-02-04 Thread Olaf Stein
From http://dev.mysql.com/doc/refman/5.0/en/string-comparison-functions.html#oper ator_like: Note Because MySQL uses C escape syntax in strings (for example, ³\n² to represent a newline character), you must double any ³\² that you use in LIKE strings. For example, to search for ³\n², specify

Average Rating, like Netflix

2008-12-22 Thread Brian Dunning
Pretend I'm Netflix and I want to return a list of found movies, including the average of related ratings for each movie. Something like this: select movies.*, average(ratings.rating) from movies, ratings where movies.movie_id=ratings.movie_id I'm sure that's wrong in about 10 different

Re: Average Rating, like Netflix

2008-12-22 Thread Brian Dunning
and I want to return a list of found movies, including the average of related ratings for each movie. Something like this: select movies.*, average(ratings.rating) from movies, ratings where movies.movie_id=ratings.movie_id I'm sure that's wrong in about 10 different ways but hopefully you get

Re: Average Rating, like Netflix

2008-12-22 Thread Brent Baisley
I'm Netflix and I want to return a list of found movies, including the average of related ratings for each movie. Something like this: select movies.*, average(ratings.rating) from movies, ratings where movies.movie_id=ratings.movie_id I'm sure that's wrong in about 10 different ways

Re: Average Rating, like Netflix

2008-12-22 Thread Andy Shellam
to a LEFT JOIN if you want all movies, even those with no ratings. Brent Baisley On Mon, Dec 22, 2008 at 11:13 AM, Brian Dunning br...@briandunning.com wrote: Pretend I'm Netflix and I want to return a list of found movies, including the average of related ratings for each movie. Something like

different results from '=' vs. 'LIKE'

2008-12-08 Thread SolidEther
Hi, I'm trying to compare strings on a varchar field. The code: 'select * from Image where `0020,0032`=-131.178600\ \107.113725\\200.064000;' returns the correct result set. However, the code: 'select * from Image where `0020,0032` LIKE %-131.178600\\107.113725\\200.064%;' returns an empty

Re: different results from '=' vs. 'LIKE'

2008-12-08 Thread Daevid Vincent
, SolidEther wrote: Hi, I'm trying to compare strings on a varchar field. The code: 'select * from Image where `0020,0032`=-131.178600\ \107.113725\\200.064000;' returns the correct result set. However, the code: 'select * from Image where `0020,0032` LIKE %-131.178600\\107.113725\\200.064

Re: different results from '=' vs. 'LIKE'

2008-12-08 Thread Daevid Vincent
cramming them together like that. This would allow you to do various trig and math functions on them easier (assuming you are storing coordinates for a reason). There are basic SQL 'update' statements you could write to fix your existing data and/or convert it to the new delimiter. This may save you

Re: different results from '=' vs. 'LIKE'

2008-12-08 Thread SolidEther
On Dec 9, 2008, at 2:03 PM, Daevid Vincent wrote: Do you seriously have a column named 0020,0032 ?!!? And don't even get me started on the actual name of these images (column data). Jepp, and there are a hell of a lot of more weird number like that. That's an attribute tag from DICOM

Re: different results from '=' vs. 'LIKE'

2008-12-08 Thread SolidEther
for bad designing in the first place ... not to mention the NU** values ... :-$) Thx for the hint! :) Cheers, Michael Or possibly just split them out into separate X, Y, Z columns rather than cramming them together like that. This would allow you to do various trig and math functions on them

REGEXP vs LIKE/OR

2008-08-15 Thread Morten Primdahl
Hi, I want to retrieve all records where the field value contains either foo, bar or baz. Like so: SELECT id FROM table WHERE value LIKE '%foo%' OR value LIKE '%bar%' OR value LIKE '%baz%'; But then I stumbled upon REGEXP, and can do the same this way: SELECT id FROM table WHERE value

RE: REGEXP vs LIKE/OR

2008-08-15 Thread emierzwa
It looks like LIKE is only slightly faster(on my XP), hardly worth mentioning. Go with what is easier for you to read or for portability if you need it. IMHO set @a='gfdueruie baz hdhrh';select BENCHMARK(500, (select 1 from dual WHERE @a LIKE '%foo%' OR @a LIKE '%bar%' OR @a LIKE '%baz

Re: doubt: mysqldump in linux like windows

2008-03-21 Thread dr_pompeii
','0.00','0.00','0.00','0.00','','0.00','300','10'); i need like the windows way, thats mean, for the first line for insertion before to insert all rows i need INSERT INTO `articulo` (`idArticulo`,`descripcion`,`stockactual`,`precioUnitario`,`precioUnitarioVenta`,`totalValorizado

doubt: mysqldump in linux like windows

2008-03-20 Thread dr_pompeii
--extended-insert--password=XXX --user=root somedb /home/Someuser/somepath/A.sql with the same undesired results how i can resolve this?? thanks in advanced -- View this message in context: http://www.nabble.com/doubt%3A-mysqldump-in-linux-like-windows-tp16185833p16185833.html Sent from the MySQL

  1   2   3   4   5   6   7   8   >