• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to improve performance.....

 
Vishal Methi
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Frnds,
The biggest problem rt now i m facing is that when i m running my client system, it is taking too much time for the connection and same time for fecthing the data from the database . For ex, Just for checking that if the user is valid, for connection with the server and giving the response it takes abt more than a min..... My database is not that much huge also .... So plz anyone suggest that how to improve the performance so that while connection or fetching the data it shud that some resonable time .
Some1 suggest me the create the index .. I have abt 100 tables and neither of the table i m using indexes. Suppose if its a gud idea can u suggest me that for which columns i have to create the indexes like primary key , Foreign key or anything else.

Note : I m running my application in LAN environment.

Plz give me some guide line so that i can choose some way where i have to go

Thanx in advance for helping me...

Vishal R. Methi
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are you actually doing when you connect to the database? Is it taking a minute for the connection itself, or for whatever query you are running when you have connected?
 
steve souza
Ranch Hand
Posts: 862
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Test running the query outside of java, with a query tool. If that also takes a minute then you will have to tune the query. If not then it is a java issue. I suspect you need to tune the query. No matter what the backend, even if you have no indexes one minute seems slow to query a typical user table.

What database are you using?
[ July 04, 2005: Message edited by: steve souza ]
 
Vishal Methi
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Thanx Mr. Paul Sturrock n Mr. steve souza
Thanx again for ur suggestion . I m using simple JDBC/ODBC connection for connection pooling. When i connect to the new and empty database its working fine with a gud speed but when i connect with my actual database with a bit heavy database, it gets very much slow. Hey could u plz tell me that when indexes doesnt increase the query fetching performance than what is the advantage of Indexes .. i dont have any idea abt the indexes ...
I hope that there is some problem with JAVA connectivity also .. can u plz suggest me how to improve the performance of the java also .

Thanx in advance again .....

Vishal
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Vishal Methi:
I m using simple JDBC/ODBC connection for connection pooling.


you didn't answer steve's question which database are you using ?


could u plz tell me that when indexes doesnt increase the query fetching performance than what is the advantage of Indexes .. i dont have any idea abt the indexes ...


How did you conclude that index doesn't increase query fetching performance.
I would recommend you read about indexes

The advantage of indexes is that it helps to find a record faster so it improves query fetching performance.
When an Index is created on one or more that columns then the column(or group of column) it represent same row. An index is stored in B-Tree form in database so it can find faster a row identification for table from B-trees mapping


I hope that there is some problem with JAVA connectivity


Go for native connectivity use type 4 driver,it imrpoves performance


Vishal,
Out of the problem I have one suggestion that please avoid using abbreviation, and non english word like ur,m,u,plz,thanx etc etc because It makes a post diffiucult to read, also javaranch is a place where people come who are not native english. It creates problem to read such post

thanks
Shailesh
 
Vishal Methi
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Thanks shailesh.
I m using MAXDB which is the product of mysql.
As per your suggestion to select Type4 Driver, could you please tell me what is extra code i have to write to change the driver in database connectivity. Thanks for this suggestion . plz tell me what is the process to change the driver.

Thanks
Vishal
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In order to make connection with thing driver nothing extra to be needed, I haven't worked with maxdb so I dont know If there is any thin driver but ther must be one.

Steps are same for creating connection, load the driver , get then connection, and use connection string for type 4 connection


Shailesh
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got one link for driver download , Check this if it works and one more
link for creating connection

hope this helps

Shailesh
 
Vishal Methi
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey Shailesh,
Thanx for the link. But is this driver is type 4 is it confirm because i m already using one driver as i told u earlier also i.e JDBC-ODBC.

Hey thanx a lot for ur co-operation..

Thanx again.

Vishal
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
These are features mentioned on the url i mentioned
  • 100 Percent pure Java
  • Supports JDK 1.2 and higher
  • Supports JDBC 2.0 (with JDK 1.2)
  • Supports JDBC 3.0 (with JDK 1.4)
  • Supports the JDBC 2.0 Standard Extension API (DataSource, XADataSource and ConnectionPoolDataSource)
  • Type 4 driver (Connects to the database using the proprietary SAP DB socket protocol)


  • Shailesh
     
    steve souza
    Ranch Hand
    Posts: 862
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    i dont have any idea about indexes ...
    I hope that there is some problem with JAVA connectivity also

    Indexes have everything to do with database performance. If your tables do not have indexes on them then any queries on a large table will be slow. I suggest you read up on them as you will never be able to write a decent database application without using them. I suspect java performance is not your problem.

    Like I said run the query in a query tool and measure its performance outside of your application.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic