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

Re: LIKE sql optimization

2014-02-12 Thread Jesper Wisborg Krogh
on spinning disks - so in general the optimizer 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,

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: LIKE sql optimization

2014-02-11 Thread Morgan Tocker
Hi Zhigang, On Feb 11, 2014, at 8:48 PM, Zhigang Zhang 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 scan, find matching

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 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 = &#

Re: LIKE sql optimization

2014-02-11 Thread louis liu
ailto: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 % .

Re: LIKE sql optimization

2014-02-11 Thread Reindl Harald
data has > 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 doe

Re: LIKE sql optimization

2014-02-11 Thread kitlenv
t; _ > > 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 if it start

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. 2

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 :

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? > >

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 to

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

2013-05-10 Thread Rick James
-05-07'. What does the {} syntax do?? Contradictory: where `Query1`.`Appointment_Provider_ID` in (9118, 9119, 60922, 9116, 47495) and `Query1`.`Appointment_Provider_ID` = 60922; The IN filter does nothing useful. I think those changes will make the query run _much

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

2013-05-10 Thread Robinson, Eric
e database, so I don't think you want a SHOW CREATE TABLE, SHOW TABLE 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@Hos

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

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

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

2013-05-09 Thread Rick James
ts.mysql.com > Subject: 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,

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 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 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:

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 --

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 : A SELECT statement that takes a long time to run prevents other session

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 syste

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 s

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

2013-05-09 Thread Rick James
y, 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 > freezes for 30-90 seconds. We check the slow query logs and find that > one user issued a co

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" > > 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 changed in such a

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 | r

Re: 'myisam_use_mmap' unstable like hell

2011-12-15 Thread Reindl Harald
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 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-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

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 sa

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 wrote: > > > Am 15.12.2011 08:47, schrieb Rob Wultsch: > > To be brutally honest, if you want stability yo

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-14 Thread Rob Wultsch
ec/mysqld(_Z24do_handle_one_connectionP3THD+0x117)[0x61fff7] > /usr/libexec/mysqld(handle_one_connection+0x50)[0x6200a0] > /lib64/libpthread.so.0(+0x6ccb)[0x7ffdaae8bccb] > /lib64/libc.so.6(clone+0x6d)[0x7ffda91bdc2d] > > Trying to get some variables. > Some pointers may be invalid an

Fwd: 'myisam_use_mmap' unstable like hell

2011-11-24 Thread Reindl Harald
ay be invalid and cause the dump to abort. Query (0x7ffd20021720): is an invalid pointer Connection ID (thread ID): 647 Status: NOT_KILLED Original-Nachricht Betreff: 'myisam_use_mmap' unstable like hell Datum: Thu, 24 Nov 2011 09:20:28 +0100 Von: Reindl Harald Organisation:

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,'%'); +---

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%';

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 misse

Re: Join based upon LIKE

2011-05-03 Thread Nuno Tavares
be sloppy about their spelling; or > (and this is where it is critical) the title might include a reference to > some > time 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 soluti

RE: Join based upon LIKE

2011-05-03 Thread Jerry Schwartz
he 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 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 E

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, lik

Re: Join based upon LIKE

2011-05-03 Thread Johan De Meersman
- Original Message - > From: "Jerry Schwartz" > > 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/... Pe

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

Re: Join based upon LIKE

2011-05-03 Thread Johan De Meersman
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 - > F

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 S

Re: Join based upon LIKE

2011-05-01 Thread Johan De Meersman
- Original Message - > From: "Jerry Schwartz" > > 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 off

Re: FW: Join based upon LIKE

2011-04-30 Thread Hal�sz S�ndor
but it yields, I believe, much more nearly such answer as you 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

Re: FW: Join based upon LIKE

2011-04-29 Thread Hal�sz S�ndor
he 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 Gene

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 tha

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&qu

Re: Join based upon LIKE

2011-04-29 Thread Johan De Meersman
- Original Message - > From: "Jerry Schwartz" > > [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 only looki

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&q

Re: Join based upon LIKE

2011-04-28 Thread Johan De Meersman
QL's built-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

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 publicati

Join based upon LIKE

2011-04-25 Thread Jerry Schwartz
rapeutics%Pipeline Assessment%Market Forecasts to%'); SELECT prod.prod_title AS `Title IN Database`, new_titles.new_title AS `Title IN Feed`, 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 pr

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 "

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 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' || '%'; &g

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 i

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

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 wrote: > The application is still being developed, so I will probably look at > storing it in separate tables so that

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

2010-08-24 Thread Tompkins Neil
t; > those values, you can do 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 >> >>

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

2010-08-24 Thread Johan De Meersman
values, you can do 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

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

2010-08-24 Thread Tompkins Neil
values, you can do 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. >> Th

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

2010-08-24 Thread Johan De Meersman
: > 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 ezel

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: 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, MIN(D

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, MIN(D

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 DDdet

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 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 WHERE...IN statem

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

2010-01-30 Thread Wagner Bianchi
ear 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.

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 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

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 wrote: > Hi; > I remember vaguely how to do this but don't know how to google it: > > show tables like categories$; > > such that it wil

Re: Like Syntax

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

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

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

2009-08-21 Thread Anoop kumar V
Peter Brawley < > peter.braw...@earthlink.net> wrote: > >> I think you'd need to use Prepare, eg replace the query with ... >> >> set @sql = concat( "select >> user_id as iamsId >> ,division_name as divisionNa

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

2009-08-21 Thread Peter Brawley
my laptop, just too heavy. 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

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

2009-08-21 Thread Anoop kumar V
to install Oracle on my laptop, just too heavy. 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

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

2009-07-07 Thread Highviews
; 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%'; > > > > &g

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 >

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" > > 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, > &

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" To: Sent: Monday, July 06, 2009 6:31 PM Subject: How to use LIK

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

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 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

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 Lis

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², spec

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 >data

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

Re: Average Rating, like Netflix

2008-12-22 Thread Andy Shellam
JOIN 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 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

Re: Average Rating, like Netflix

2008-12-22 Thread Brent Baisley
;> those with no ratings. >> >> Brent Baisley >> >> >> On Mon, Dec 22, 2008 at 11:13 AM, Brian Dunning >> wrote: >>> >>> Pretend I'm Netflix and I want to return a list of found movies, >>> including >>> the average of related ratings

Re: Average Rating, like Netflix

2008-12-22 Thread Brian Dunning
tflix 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

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 abo

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

2008-12-08 Thread SolidEther
holly god of db schema design will put rage upon me 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

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 attr

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

2008-12-08 Thread Daevid Vincent
eparate X, Y, Z columns rather than 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 c

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

2008-12-08 Thread Daevid Vincent
good luck! D.Vin http://daevid.com On Tue, 2008-12-09 at 12:42 +1300, 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";' retu

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\

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

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 stu

Re: doubt: mysqldump in linux like windows

2008-03-21 Thread dr_pompeii
t; ('1-P0014','POLOS >> HONDA','0.00','0.00','0.00','0.00','','0.00','300','10'), >> >> >> now with the new command already shown >> i have this way >> >> &g

Re: doubt: mysqldump in linux like windows

2008-03-20 Thread Moon's Father
;0.00','300','10'), > > > now with the new command already shown > i have this way > > > LOCK TABLES `articulo` WRITE; > /*!4 ALTER TABLE `articulo` DISABLE KEYS */; > INSERT INTO `articulo` VALUES ('1-15W40','ACEITE EXTRAVI

  1   2   3   4   5   6   7   8   >