Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4582782
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T21:07:25+00:00 2026-05-21T21:07:25+00:00

I am using this query for searching, but the query is slow. Can anyone

  • 0

I am using this query for searching, but the query is slow. Can anyone suggest me an alternative for this query?

SELECT c.ctgr_name,n.lgcode,n.newsID,n.newsTITLE,n.image3,n.ctgr_code 
FROM tbnews  n LEFT JOIN tbcategory c ON c.ctgr_code=n.ctgr_code  
WHERE (newsTITLE LIKE "% Foray %" OR image3 LIKE "%Foray%" OR video3 LIKE "%Foray%" 
OR newsTITLE LIKE "% Foray %" OR image3 LIKE "%Foray%" OR video3 LIKE "%Foray%" ) 
AND (n.publish!=0) 
ORDER BY newsID DESC LIMIT 10
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T21:07:26+00:00Added an answer on May 21, 2026 at 9:07 pm

    1) Always run EXPLAIN SELECT before asking for optimization. Stick “EXPLAIN” keyword before your query and then run it – MySQL will tell you what it wants to do and you’ll see immediately where it gets stuck and where it doesn’t use indexes.

    2) Using LIKE ‘%%’ searches (with percentage sign before AND after keyword) forces MySQL to do full table scan. Using a search such as LIKE ‘keyword%’ MIGHT make MySQL use the index on that field, if the index exists.

    3) Configure your MySQL instance, tweaking the config and using appropriate storage engine can boost performance by a huge margin. By default, MySQL is configured to work on very slow machines and use very little resources – hence, when a table gets slightly larger (say, 100k rows), people notice performance drop. MySQL can cope with large tables easily, if configured properly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want DBSession.query(Article).group_by(Article.created.month).all() But this query can't using How do I do this using
I am using this query: SELECT DISTINCT pat.PublicationID FROM dbo.PubAdvTransData AS pat INNER JOIN
When using this SQL query: Select * from table_name what happens if the name
i've been using the following query: select LEN(columnname) as columnmame from dbo.amu_datastaging This works,
I have this mysql query using PHP and first part is working fine, but
Currently, I am using this query, which does a pretty good job of finding
I am trying to return voice messages from a database using this query :
I'm using this SQL query to create an index: $query = CREATE INDEX id_index2
I have this query that inserts rows, using a subquery like so: INSERT INTO
I would like to turn this query to regular inline sql without using stored

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.