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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:53:37+00:00 2026-05-21T05:53:37+00:00

Im trying to start an embedded version of hsqldb, and it works fine with

  • 0

Im trying to start an embedded version of hsqldb, and it works fine with the tool that are included, they’re not slow or anything.

But when i try to use the following code to get 20 rows, it takes up to 10 seconds before all results are printed

Class.forName("org.hsqldb.jdbcDriver");
Connection conn = DriverManager.getConnection("jdbc:hsqldb:hsql://127.0.0.1/woopwoop", "SA", "");

Statement st = conn.createStatement(); 

ResultSet rs = st.executeQuery("SELECT * FROM ttris_users");

while(rs.next())
{
    output += "<tr>";

    output += "<td>" + rs.getString("id") + "</td>";
    output += "<td>" + rs.getString("name") + "</td>";
    output += "<td>" + rs.getString("password") + "</td>";
    output += "<td>" + rs.getString("email") + "</td>";
    //name, password, email

    output += "</tr>";
}

I initialize the server in a very simple way, and that might be why it runs slow, how can i optimize it?

org.hsqldb.server.Server server = new org.hsqldb.server.Server();
server.setDatabaseName(1, "woopwoop");
server.setDatabasePath(1, "C:\\ttris\\db\\");
server.start();

In the log that is printed in the console, it shows the query 27 times

[Edit]
heres the first entries in the log

[Server@1050e1f]: [Thread[HSQLDB Server @1050e1f,5,main]]: handleConnection(Socket[addr=/127.0.0.1,port=37523,localport=9001]) entered
[Server@1050e1f]: [Thread[HSQLDB Server @1050e1f,5,main]]: handleConnection() exited
[Server@1050e1f]: [Thread[HSQLDB Connection @3e0ebb,5,HSQLDB Connections @1050e1f]]: 0:Trying to connect user 'SA' to DB (woopwoop)
[Server@1050e1f]: [Thread[HSQLDB Connection @3e0ebb,5,HSQLDB Connections @1050e1f]]: 0:Connected user 'SA'
[Server@1050e1f]: 0:SELECT * FROM ttris_users
[Server@1050e1f]: [Thread[HSQLDB Server @1050e1f,5,main]]: handleConnection(Socket[addr=/127.0.0.1,port=37524,localport=9001]) entered
[Server@1050e1f]: [Thread[HSQLDB Server @1050e1f,5,main]]: handleConnection() exited
[Server@1050e1f]: [Thread[HSQLDB Connection @76fba0,5,HSQLDB Connections @1050e1f]]: 1:Trying to connect user 'SA' to DB (woopwoop)
[Server@1050e1f]: [Thread[HSQLDB Connection @76fba0,5,HSQLDB Connections @1050e1f]]: 1:Connected user 'SA'
[Server@1050e1f]: 1:SELECT * FROM ttris_users
[Server@1050e1f]: [Thread[HSQLDB Server @1050e1f,5,main]]: handleConnection(Socket[addr=/127.0.0.1,port=37525,localport=9001]) entered
[Server@1050e1f]: [Thread[HSQLDB Server @1050e1f,5,main]]: handleConnection() exited
[Server@1050e1f]: [Thread[HSQLDB Connection @16dadf9,5,HSQLDB Connections @1050e1f]]: 2:Trying to connect user 'SA' to DB (woopwoop)
[Server@1050e1f]: [Thread[HSQLDB Connection @16dadf9,5,HSQLDB Connections @1050e1f]]: 2:Connected user 'SA'
[Server@1050e1f]: 2:SELECT * FROM ttris_users

The issue was located in the servlet that was using the data, and is now resolved

  • 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-21T05:53:38+00:00Added an answer on May 21, 2026 at 5:53 am

    Something is off here. I don’t think you’re giving us all the code we need to identify the problem.

    If your log is showing the query executing 27 times, then this is the problem. Find out why. The code you pasted doesn’t contain a loop that would cause this. So I have to assume that the code that’s causing this was left out of the sample you gave us.

    Put additional entries in the log and trace your program through execution. Find out where and why it is looping 27 times. The information you give us shows no indication of this.

    Also, you say that you use this code to get 20 tables. Do you mean 20 records/rows? I only see a query from one table: ttris_users.

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

Sidebar

Related Questions

I am trying to start service from AsyncTask but cant see that its starts.
I'm trying to start a phantomjs process from python but for some reason it's
I am trying to start a new Rails project but I am getting a
I am trying to start an embedded Google App Engine Development Server (sdk 1.7.3)
I'm trying to familiarize myself with the embedded field, but also have limited resources
I'm trying to develop an app that has many videos embedded in it, and
I've included all jars the application requires, I'm trying to use Jetty Embedded I
Hi im trying to extract a file from my embedded resource but the issue
Every time I'm trying start a database instance and I'm not connected to my
I'm trying to build a simple demo app with embedded Jetty that serves static

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.