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

  • Home
  • SEARCH
  • 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 6741875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:46:37+00:00 2026-05-26T11:46:37+00:00

String s1 = create table +tableName+ (id number NOT NULL PRIMARY KEY, + url

  • 0
String s1 = "create table " +tableName+
        "(id number NOT NULL PRIMARY KEY, " +
        "url varchar(1000) NOT NULL, " +
        "urlHash varchar(255) NOT NULL, " +
        "contentHash varchar(255), " +
        "modDate varchar(30), " +
        "contentLocation varchar(100), " +
        "status integer, " +
        "lastCrawlDate varchar(30)) ";

    String s3 = "create sequence " +sequenceName+ " start with 1 increment by 1 nomaxvalue";

        stmt=conn.createStatement();
        stmt.executeUpdate(s1);
        stmt.executeUpdate(s3);

    ps = conn.prepareStatement (
              "INSERT INTO testing (id, url, urlHash, contentHash, modDate, contentLocation, status, lastCrawlDate) VALUES(test_seq.nextval,?,?,?,?,?,?,?)");


              ps.setString (1, url);
              ps.setString (2, urlHash);
              ps.setString (3, contentHash);
              ps.setString (4, modDate);
              ps.setString (5, contentLocation);
              ps.setLong (6, status);
              ps.setString (7, lastCrawlDate);

And my select query will revolve around urlHash and modDate. So if I create an index on these columns.

CREATE INDEX hash_date_idx ON tableName (urlHash asc, modDate asc);

And then if I fire select query based on these two columns or single column then what will happen in background. Can anyone explain that as I am new to oracle database world. And what kind of index is generally the best in this case. And on what basis we should use one.

Select * from tabelName where urlHash like '%asdreefjhsawofjkwjfkwqdskdjksdwq%';
  • 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-26T11:46:37+00:00Added an answer on May 26, 2026 at 11:46 am

    A leading wildcard with the like operator will make oracle to ignore the index on urlHash.

    You can do either of the follwing for better performance:

    1. use index hints with select

      select /*+index(tableName,hash_date_idx)*/ * from tabelName ...
      
    2. use full text indexing CONTEXT on urlHash column.

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

Sidebar

Related Questions

'Create field in table Public Sub createField(ByVal tableName As String, ByVal fieldName As String,
I have a string like following: CREATE GLOBAL TEMPORARY TABLE some_temp_table_name or CREATE GLOBAL
I'm trying to create a dictionary type - ie hash table with a string
If I had the following table. create_table :my_table, :id => false do |t| t.string
Typical way of creating a CSV string (pseudocode): Create a CSV container object (like
If I create a String with [NSString StringWithFormat], do I have to [retain] it?
I would like to create a String.replaceAll() method in JavaScript and think using a
How do I create a string so that it formats floating point numbers to
I want to create a string in JavaScript that contains all ascii characters. How
i want to create a string S , which can be used as an

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.