Questions tagged [substring]

The SUBSTRING function is used to return a portion of a string.

8 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
1answer
5k views

MySQL "Out of sort memory" error on a simple GROUP_CONCAT query

I have a (what it seems to me) simple query which fails to run on a simple table, the error is: Out of sort memory, consider increasing server sort buffer size These are the SQL statements which I'...
1
vote
0answers
51 views

Finding and replacing non-specific text to lowercase variant

I've been cracking my brain on a problem that I had at work. In one of my tables is a bunch of rows, with a certain column that contains XML data that has several properties like this: (simplified) &...
0
votes
0answers
28 views

Is instant text search possible in big table with HTMLs?

I have a pretty big table with HTMLs (about 500K rows, average length of text is ~150K). It is required to make fast search (less than 1s) rows which match let say '%<meta name="twitter:app%'. ...
0
votes
0answers
32 views

Speed up query on large MySQL table

SELECT property, geo, stars FROM table WHERE SUBSTRING_INDEX(geo, '>', 3) LIKE '%$mylocation%' ...loop to show results geo column has values like - Spain>Canary Islands>Lanzarote>Some ...
0
votes
2answers
18 views

Combining previously different rows after changing value during query

I'm currently running a query that is supposed to return a salesperson's aggregated revenue, grouped by individual clients. Because of how user input was handled, there are a lot of near-duplicate ...
0
votes
0answers
29 views

How performant is finding a substring in database?

To route requests on my website, I need to query the database to see if the first part of a URL matches a category for an item. For example: I have a request to /animals/dog/darktheme/. The ...
0
votes
1answer
134 views

how to use substring with a delimiter

Employee_M City Emp_Num_ID Cleveland 2164445437/FTTD/JAMES, TYLER/139561151 Tokyo 1261120379/FTTD/BOYD, ADAMS/14468140 Marakech 4049838896/FTTD/SMITH, TULY E/13956144 Houston ...
0
votes
0answers
72 views

problem with substring in mysql

I have simple EAV like database which has 3 tables: products, attributes, attribute_values. I am using below code to find all products that have attribute 'length' and then I am using substring ...