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
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
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
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
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
@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
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
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
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
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
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
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
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
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
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
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
-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
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
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
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
-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
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
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?
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
.
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
- 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
mysql explain select * from cuenta where rutaCuenta like 'CTV%';
++-++---+---++-+--++-+
| id | select_type | table | type | possible_keys | key| key_len
| ref | rows | Extra
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
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
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
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
/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
' 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
: '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
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
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
-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
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
-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
- 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
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
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
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
-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
- 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
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
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
- 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
-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
-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
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
-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
-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
`,
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
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
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
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
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
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
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
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
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
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
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
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,
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,
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
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
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
...@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
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/
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
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
On Sat, Dec 5, 2009 at 11:09 AM, Michael Dykman mdyk...@gmail.com wrote:
show tables like 'categories%';
Thanks.
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
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
;
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
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
:
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
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
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
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
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
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
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
-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
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
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
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
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
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
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
, 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
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
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
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
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
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
','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
--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 - 100 of 714 matches
Mail list logo