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 8010907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:52:35+00:00 2026-06-04T18:52:35+00:00

I am making a research project on search engines, and i am having problems

  • 0

I am making a research project on search engines, and i am having problems with a performance of the for loop. I have the following problem:

for value in hash_array.keys():  
        cell= db_conn.use_client().hql_query(db_conn.use_namespace(),'SELECT doc_text FROM SE_doc_text WHERE ROW=\"'+
                             value+"\" SCAN_AND_FILTER_ROWS LIMIT 1").cells  
        list_result[value].append(cell[0].value)

Using hypertable i want to have the best performance, but when i am using it on 20.000 or 30.000 elements of the hash_array.keys() i have a result like 5-6 min, so that’s slow really slow. Any other way of performing a fast for? or should i use my plan b for the whole search engine.

Performance of the query:

  Elapsed time:  0.10 s
Avg value size:  1428.00 bytes
  Avg key size:  57.00 bytes
    Throughput:  595190.38 bytes/s
   Total cells:  1
    Throughput:  400.80 cells/s

Tested on hardware:

8gb 1600mhz
1055t amd

Additional facts:

 Without SCAN_AND_FILTER_ROWS: 1.78163504601ms
 With SCAN_AND_FILTER_ROWS: 3.27163504601ms
 Only for loop: 0.0630ms

With the solution (from the answer) i have the following:

stringRow = ' AND '.join(["ROW = \""+value + "\"" for value in hash_array.keys()])
cell = db_conn.use_client().hql_query(db_conn.use_namespace(),stringBatch+stringRow).cells  

Results:  0.355320930481ms for 2097 documents
          1.0214779377 for 3565 documents

It is good but it’s not best solution.

  • 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-06-04T18:52:36+00:00Added an answer on June 4, 2026 at 6:52 pm

    I’ve never used Hypertable but simply reading the documentation suggest the SCAN_AND_FILTER_ROWS clause may be a problem:

    This is an explicit optimization for the case where you’re querying
    for a very large number of row intervals (e.g. 10,000+). Instead of
    fetching each row interval independently, this option will cause the
    system to do a full table scan and filter the results to find the rows
    that are desired. Use this option with caution, it can be extremely
    inefficient for smaller number of row intervals.

    This clause may become more appropriate if you send batches of keys at once.

    Reading more documentation suggests batching would be possible with the following construct:

    | '(' [row_key relop] ROW relop row_key
          (OR [row_key relop] ROW relop row_key)* ')'
    

    So, construct a query with a disjunction of, say, 100 separate keys: ROW=x OR ROW=y OR....

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

Sidebar

Related Questions

I have been making some research in the domain of servers for a website
i am making a research in R project. Data is stored in 3 zoo
I'm currently making my own social network and I have a php problem which
I have a problem and make some research but did not reach anything. I
Making my first steps in RIA Services (VS2010Beta2) and i encountered this problem: created
Making websites that appear correctly in IE is a big problem. Is there any
When making relations between tables (in mysql), I have encountered a naming dilemma. For
I like the idea of making research available at multiple levels of detail i.e.,
Context: I'm making a simple solar system simulation in c++/OpenGL. Research: I've tried searching
I'm doing a bit of hands on research surrounding the speed benefits of making

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.