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

The Archive Base Latest Questions

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

I have a table with a large number of columns (~60), which will eventually

  • 0

I have a table with a large number of columns (~60), which will eventually have a large number of rows (~10 000), and I’m going to need to be able to search efficiently on several column values at once. I’m not sure whether the searches will be exact-match (LIKE 'value', and not LIKE '%value%'), although LIKE 'value%' might be an acceptable compromise.

A few solutions have been proposed. I’m not very familiar with database design principles, so it’s not obvious to me which is the best:

  1. Index on every column individually. The users will be able to search on any combination of columns, so no more complicated indexes will work. There will be a lot more reads than writes on the database, so the write-speed slowdown shouldn’t be a problem.

  2. Make another table just for searching that looks like this:

    obj_id  col_num  col_name  col_value
    -------------------------------------    
    1       1        'name'    'joe'    
    1       2        'job'     'engineer'    
    2       1        'name'    'bill'
    

    etc. I think the col_num and col_name columns are redundant, but
    presumably one is better than another. I have no idea what this is
    called, although it sounds like the Entity-Attribute-Value
    model
    (see also this question). From what I can tell, the
    main difference from an EAV model is that this table would not be
    sparse; all entities will have most or all attributes.

  3. Make another table for an inverted index on the first table. I know how to do this in theory, but it would be a huge amount of work. Also, we’d probably lose information about which column each datum is from, which is not great. Also also, this feels like it would be redundant with solution 1, but I don’t actually know how table indexes are created.

Those are the solutions that we have come up with so far. If it’s relevant, we’re using an Oracle db, which is not really optional, but I have the permissions to refactor the database in any way necessary. So, what is the best solution here? “None of the above” is a totally acceptable answer, of course. None of these tables actually exist yet, so there’s nothing to wipe out and remake.

Thanks!

  • 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-25T17:45:08+00:00Added an answer on May 25, 2026 at 5:45 pm

    The examples you mention are indeed a better match for full text searching (as Bill Karwin suggests). Without seeing a (draft) table definition, it’s hard to see if that’s actually the case.

    The good news is that 10K records is a trivial amount for a well-tuned Oracle server. If that’s the largest your table will grow, I would avoid any exotic solutions in favour of maintainability.

    EAV basically makes boolean operators into a huge pain in the backside, and makes supporting specific datatypes (text, dates, numbers etc.) into an equally big pain.

    I’d build a sample of your table with your best guess at the indexing scheme, populate it with representative dummy data, and run queries along the lines of the ones you expect to need. Measure performance, and see if you have a problem; optimize your indices and queries, and only go to a refactoring if you really need to.

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

Sidebar

Related Questions

I have an HTML table with a large number of rows, and I need
I have a large number of rows in a table within which I wish
My table has a large number of columns. I have a command to copy
I have a database table with a large number of rows and one numeric
I have a large table (between 74 and 88million rows) which is the middle
I have a table with large number of rows(~200 million) and I want to
I have a table containing a large number of rows. Each row has 2
I have a large access table . I need to have a column which
I have a table containing a large number of rows. Each row has 2
I have a Django model with a large number of fields and 20000+ table

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.