Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

New JDBC 1.2 driver runs slower than JDBC 1.1 driver-- exp..

 
   Database Help (Home) -> JDBC Driver RSS
Next:  com.microsoft.sqlserver.jdbc.SQLServerException: ..  
Author Message
Bob Heingartner

External


Since: Mar 05, 2008
Posts: 4



(Msg. 1) Posted: Wed Mar 05, 2008 7:13 am
Post subject: New JDBC 1.2 driver runs slower than JDBC 1.1 driver-- expected??
Archived from groups: microsoft>public>sqlserver>jdbcdriver (more info?)

I have some test programs I run which do repeated simple SQL Select and SQL
update statements. These test programs consistently take 5 to 10% longer to
run with the new JDBC 1.2 driver than they do with the JDBC 1.1 driver. Is
this expected? I thought the new driver was supposed to be higher
performance, not lower performance. Here is the select statement I am doing:

SELECT HomeServerCID, FirstName, MiddleName, LastName, PersonType, Pin,
FacilityCode, Inactive, Disabled, ADA, Deleted, Noticed, LastModDT, Text1,
Text2, Text3, Text4, Text5, text6, text7, text8, text9, Int1, Int2, Int3,
Int4, Int5, Logical1, Logical2, Logical3, Logical4, Date1, Date2,
ActivateAPEvent, AssetAdministrator, ImageCaptureDT, SignatureCaptureDT,
PersonGID, LastModPersonGID, IsCCmUSer, HasBeenCCMUser FROM person WHERE
PersonGID = xxxx

Here is the update statement:
UPDATE person SET HomeServerCID = HomeServerCID WHERE PersonGID = xxxx

(In both cases, xxxx varies in a loop so different records are selected.)


I can provide the complete java source code if needed, but you will also
need a database backup to run them.

 >> Stay informed about: New JDBC 1.2 driver runs slower than JDBC 1.1 driver-- exp.. 
Back to top
Login to vote
Evan T. Basalik (MSFT)

External


Since: Nov 21, 2006
Posts: 24



(Msg. 2) Posted: Sun Mar 16, 2008 7:37 pm
Post subject: RE: New JDBC 1.2 driver runs slower than JDBC 1.1 driver-- expected?? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Bob,

While we did not specifically target performance with the v1.2 driver beyond the Adapative Buffering changes, I am surprised that you are seeing slower
performance with the v1.2 driver. Do you only see the problem with your custom database? Do you think the problem would reproduce against a generic
database?

Also, it looks like both your SELECT and UPDATE statement are restricted to a single table. If that is the case, then can you provide the definition for your
table and your Java code? I should be able to use those to generate some sample data pretty easily so I can do a similar test in my environment.

Evan
--------------------
>Thread-Topic: New JDBC 1.2 driver runs slower than JDBC 1.1 driver-- expected??
>thread-index: Ach+02cBj6yAlt+wSw2Q7Yv4oIbaxA==
>X-WBNR-Posting-Host: 63.69.129.2
>From: =?Utf-8?B?Qm9iIEhlaW5nYXJ0bmVy?=
>Subject: New JDBC 1.2 driver runs slower than JDBC 1.1 driver-- expected??
>Date: Wed, 5 Mar 2008 07:13:01 -0800
>Lines: 22
>Message-ID:
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2992
>Newsgroups: microsoft.public.sqlserver.jdbcdriver
>Path: TK2MSFTNGHUB02.phx.gbl
>Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.jdbcdriver:453
>NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
>X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
>
>I have some test programs I run which do repeated simple SQL Select and SQL
>update statements. These test programs consistently take 5 to 10% longer to
>run with the new JDBC 1.2 driver than they do with the JDBC 1.1 driver. Is
>this expected? I thought the new driver was supposed to be higher
>performance, not lower performance. Here is the select statement I am doing:
>
>SELECT HomeServerCID, FirstName, MiddleName, LastName, PersonType, Pin,
>FacilityCode, Inactive, Disabled, ADA, Deleted, Noticed, LastModDT, Text1,
>Text2, Text3, Text4, Text5, text6, text7, text8, text9, Int1, Int2, Int3,
>Int4, Int5, Logical1, Logical2, Logical3, Logical4, Date1, Date2,
>ActivateAPEvent, AssetAdministrator, ImageCaptureDT, SignatureCaptureDT,
>PersonGID, LastModPersonGID, IsCCmUSer, HasBeenCCMUser FROM person WHERE
>PersonGID = xxxx
>
>Here is the update statement:
>UPDATE person SET HomeServerCID = HomeServerCID WHERE PersonGID = xxxx
>
>(In both cases, xxxx varies in a loop so different records are selected.)
>
>
>I can provide the complete java source code if needed, but you will also
>need a database backup to run them.
>

Evan T. Basalik
This posting is provided “AS IS” with no warranties, and confers no rights.

 >> Stay informed about: New JDBC 1.2 driver runs slower than JDBC 1.1 driver-- exp.. 
Back to top
Login to vote
Bob Heingartner

External


Since: Mar 05, 2008
Posts: 4



(Msg. 3) Posted: Mon Mar 17, 2008 5:58 am
Post subject: RE: New JDBC 1.2 driver runs slower than JDBC 1.1; my db definition [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I do think this would happen in general, not just for my database; however, I
do not have time right now to reproduce against a generic database. Both
queries are against a single table (the person table)
Here is the definition of this table:

USE [ccc_glasgow_spey]
GO
/****** Object: Table [dbo].[Person] Script Date: 03/17/2008 08:51:21
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Person](
[HomeServerCID] [int] NULL,
[PersonEUID] [nvarchar](40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PersonGID] [decimal](19, 0) NOT NULL CONSTRAINT [DF_Person_PersonGID]
DEFAULT ((0)),
[FirstName] [nvarchar](63) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
CONSTRAINT [DF_Person_FirstName] DEFAULT (''),
[MiddleName] [nvarchar](60) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
CONSTRAINT [DF_Person_MiddleName] DEFAULT (''),
[LastName] [nvarchar](63) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
CONSTRAINT [DF_Person_LastName] DEFAULT (''),
[PersonType] [int] NOT NULL CONSTRAINT [DF_Person_PersonType] DEFAULT ((0)),
[PIN] [int] NOT NULL CONSTRAINT [DF_Person_PIN] DEFAULT ((0)),
[BadgeLayoutID] [int] NOT NULL CONSTRAINT [DF_Person_BadgeLayoutID]
DEFAULT ((0)),
[FacilityCode] [int] NOT NULL CONSTRAINT [DF_Person_FacilityCode] DEFAULT
((0)),
[Inactive] [bit] NOT NULL CONSTRAINT [DF_Person_Inactive] DEFAULT ((0)),
[Disabled] [bit] NOT NULL CONSTRAINT [DF_Person_Disabled] DEFAULT ((0)),
[ADA] [bit] NOT NULL CONSTRAINT [DF_Person_ADA] DEFAULT ((0)),
[Deleted] [bit] NOT NULL CONSTRAINT [DF_Person_Deleted] DEFAULT ((0)),
[Noticed] [bit] NOT NULL CONSTRAINT [DF_Person_Noticed] DEFAULT ((0)),
[LastModDT] [int] NULL CONSTRAINT [DF_Person_LastModDT] DEFAULT ((0)),
[GlobalLastModDT] [int] NULL CONSTRAINT [DF_Person_GlobalLastModDT]
DEFAULT ((0)),
[LastModPersonEUID] [nvarchar](40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LastModPersonGID] [decimal](19, 0) NULL CONSTRAINT
[DF_Person_LastModPersonGID] DEFAULT ((0)),
[Text1] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
CONSTRAINT [DF_Person_Text1] DEFAULT (''),
[Text2] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
CONSTRAINT [DF_Person_Text2] DEFAULT (''),
[Text3] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
CONSTRAINT [DF_Person_Text3] DEFAULT (''),
[Text4] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
CONSTRAINT [DF_Person_Text4] DEFAULT (''),
[Text5] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
CONSTRAINT [DF_Person_Text5] DEFAULT (''),
[Int1] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int1] DEFAULT ((0)),
[Int2] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int2] DEFAULT ((0)),
[Int3] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int3] DEFAULT ((0)),
[Int4] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int4] DEFAULT ((0)),
[Int5] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int5] DEFAULT ((0)),
[Logical1] [bit] NOT NULL CONSTRAINT [DF_Person_Logical1] DEFAULT ((0)),
[Logical2] [bit] NOT NULL CONSTRAINT [DF_Person_Logical2] DEFAULT ((0)),
[Date1] [datetime] NULL,
[Date2] [datetime] NULL,
[ActivateAPEvent] [bit] NOT NULL CONSTRAINT [DF_Person_ActivateAPEvent]
DEFAULT ((0)),
[AssetAdministrator] [bit] NOT NULL CONSTRAINT
[DF_Person_AssetAdministrator] DEFAULT ((0)),
[ImageCaptureDT] [int] NULL CONSTRAINT [DF_Person_ImageCaptureDT] DEFAULT
((0)),
[BadgePrintDT] [int] NULL CONSTRAINT [DF_Person_BadgePrintDT] DEFAULT ((0)),
[SignatureCaptureDT] [int] NULL CONSTRAINT [DF_Person_SignatureCaptureDT]
DEFAULT ((0)),
[TransactionNum] [int] NOT NULL CONSTRAINT [DF_Person_TransactionNum]
DEFAULT ((0)),
[IsCcmUser] [bit] NOT NULL CONSTRAINT [DF_Person_IsCcmUser] DEFAULT ((0)),
[HasBeenCcmUser] [bit] NOT NULL CONSTRAINT [DF_Person_HasBeenCcmUser]
DEFAULT ((0)),
[ImageReplicationCategory] [int] NOT NULL CONSTRAINT
[DF_Person_ImageReplicationCategory] DEFAULT ((2)),
[ImageLastModDT] [int] NULL CONSTRAINT [DF_Person_ImageLastModDT] DEFAULT
((0)),
[Temp] [bit] NOT NULL CONSTRAINT [DF_Person_Temp] DEFAULT ((0)),
[CardLastModDT] [int] NULL CONSTRAINT [DF_Person_CardLastModDT] DEFAULT
((0)),
[PersonIdentifier] [decimal](20, 0) NOT NULL CONSTRAINT
[DF_Person_PersonIdentifier] DEFAULT ((0)),
[OrganizationalCategory] [decimal](20, 0) NOT NULL CONSTRAINT
[DF_Person_OrganizationalCategory] DEFAULT ((0)),
[OrganizationalIdentifier] [decimal](20, 0) NOT NULL CONSTRAINT
[DF_Person_OrganizationalIdentifier] DEFAULT ((0)),
[POAssociatCategory] [decimal](20, 0) NOT NULL CONSTRAINT
[DF_Person_POAssociatCategory] DEFAULT ((0)),
[Int6] [decimal](28, 0) NULL,
[Int7] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int7] DEFAULT ((0)),
[Int8] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int8] DEFAULT ((0)),
[Int9] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int9] DEFAULT ((0)),
[Logical3] [bit] NOT NULL CONSTRAINT [DF_Person_Logical3] DEFAULT ((0)),
[Logical4] [bit] NOT NULL CONSTRAINT [DF_Person_Logical4] DEFAULT ((0)),
[Date3] [datetime] NULL,
[Date4] [datetime] NULL,
[Text6] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL,
[Text7] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL,
[Text8] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
[DF_Person_Text8] DEFAULT (''),
[Text9] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
[DF_Person_Text9] DEFAULT (''),
[Text10] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
[DF_Person_Text10] DEFAULT (''),
[Text11] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
[DF_Person_Text11] DEFAULT (''),
[Text12] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
[DF_Person_Text12] DEFAULT (''),
[Text13] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
[DF_Person_Text13] DEFAULT (''),
[Text14] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
[DF_Person_Text14] DEFAULT (''),
[Text15] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
[DF_Person_Text15] DEFAULT (''),
[Text16] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
[DF_Person_Text16] DEFAULT (''),
[Text17] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
[DF_Person_Text17] DEFAULT (''),
[Text18] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
[DF_Person_Text18] DEFAULT (''),
[Text19] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
[DF_Person_Text19] DEFAULT (''),
[Text20] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
[DF_Person_Text20] DEFAULT (''),
[Text21] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
[DF_Person_Text21] DEFAULT (''),
[Text22] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
[DF_Person_Text22] DEFAULT (''),
[Text23] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
[DF_Person_Text23] DEFAULT (''),
[Text24] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
[DF_Person_Text24] DEFAULT (''),
[Text25] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
[DF_Person_Text25] DEFAULT (''),
CONSTRAINT [PK_Person] PRIMARY KEY CLUSTERED
(
[PersonGID] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

GO

/** Many fields have indexes, they are all like this */
USE [ccc_glasgow_spey]
GO
/****** Object: Index [FirstName] Script Date: 03/17/2008 08:54:43 ******/
CREATE NONCLUSTERED INDEX [FirstName] ON [dbo].[Person]
(
[FirstName] ASC
)WITH (PAD_INDEX = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF,
IGNORE_DUP_KEY = OFF, ONLINE = OFF) ON [PRIMARY]

/* Full list of fields with indexes, defined as above:
FirstName
FullName
GlobalLastModDT
Int1
Int2
Int6
Int7
LastModDT
PersonEUID
Text1
Text2
Text6
Text7
Text8
Text9
Text10
------------------------------------------------------------------------------------
"Evan T. Basalik (MSFT)" wrote:

> Bob,
>
> While we did not specifically target performance with the v1.2 driver beyond the Adapative Buffering changes, I am surprised that you are seeing slower
> performance with the v1.2 driver. Do you only see the problem with your custom database? Do you think the problem would reproduce against a generic
> database?
>
> Also, it looks like both your SELECT and UPDATE statement are restricted to a single table. If that is the case, then can you provide the definition for your
> table and your Java code? I should be able to use those to generate some sample data pretty easily so I can do a similar test in my environment.
>
> Evan
> --------------------
> >Thread-Topic: New JDBC 1.2 driver runs slower than JDBC 1.1 driver-- expected??
> >thread-index: Ach+02cBj6yAlt+wSw2Q7Yv4oIbaxA==
> >X-WBNR-Posting-Host: 63.69.129.2
> >From: =?Utf-8?B?Qm9iIEhlaW5nYXJ0bmVy?=
> >Subject: New JDBC 1.2 driver runs slower than JDBC 1.1 driver-- expected??
> >Date: Wed, 5 Mar 2008 07:13:01 -0800
> >Lines: 22
> >Message-ID:
> >MIME-Version: 1.0
> >Content-Type: text/plain;
> > charset="Utf-8"
> >Content-Transfer-Encoding: 7bit
> >X-Newsreader: Microsoft CDO for Windows 2000
> >Content-Class: urn:content-classes:message
> >Importance: normal
> >Priority: normal
> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2992
> >Newsgroups: microsoft.public.sqlserver.jdbcdriver
> >Path: TK2MSFTNGHUB02.phx.gbl
> >Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.jdbcdriver:453
> >NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
> >X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
> >
> >I have some test programs I run which do repeated simple SQL Select and SQL
> >update statements. These test programs consistently take 5 to 10% longer to
> >run with the new JDBC 1.2 driver than they do with the JDBC 1.1 driver. Is
> >this expected? I thought the new driver was supposed to be higher
> >performance, not lower performance. Here is the select statement I am doing:
> >
> >SELECT HomeServerCID, FirstName, MiddleName, LastName, PersonType, Pin,
> >FacilityCode, Inactive, Disabled, ADA, Deleted, Noticed, LastModDT, Text1,
> >Text2, Text3, Text4, Text5, text6, text7, text8, text9, Int1, Int2, Int3,
> >Int4, Int5, Logical1, Logical2, Logical3, Logical4, Date1, Date2,
> >ActivateAPEvent, AssetAdministrator, ImageCaptureDT, SignatureCaptureDT,
> >PersonGID, LastModPersonGID, IsCCmUSer, HasBeenCCMUser FROM person WHERE
> >PersonGID = xxxx
> >
> >Here is the update statement:
> >UPDATE person SET HomeServerCID = HomeServerCID WHERE PersonGID = xxxx
> >
> >(In both cases, xxxx varies in a loop so different records are selected.)
> >
> >
> >I can provide the complete java source code if needed, but you will also
> >need a database backup to run them.
> >
>
> Evan T. Basalik
> This posting is provided “AS IS” with no warranties, and confers no rights.
>
>
>
 >> Stay informed about: New JDBC 1.2 driver runs slower than JDBC 1.1 driver-- exp.. 
Back to top
Login to vote
Bob Heingartner

External


Since: Mar 05, 2008
Posts: 4



(Msg. 4) Posted: Mon Mar 17, 2008 6:05 am
Post subject: RE: New JDBC 1.2 driver runs slower than JDBC 1.1 driver-- expecte [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Here is the java code I used (The definition of person table is in a separate
post):

public class StatementOverMS
{
// Set options based on the database we're testing.

//Following for Bob SQL2005 db with MS driver
static String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
static String url =
"jdbc:sqlserver://localhost;databaseName=ccc_glasgow_spey";
//static String url =
"jdbc:sqlserver://localhost\\BOB2005;databaseName=ccc_manyPerson";


static String userid = "sa";
static String passwd = "sa";





public static void main (String args [])
throws SQLException, ClassNotFoundException
{
basicStatement(); //For update test
selectStatement(); //For Select Test
}

public static void basicStatement ()
throws SQLException, ClassNotFoundException
{
System.out.println("basic statement MS SQL:");
String query = null;

//StartConnection here:
Class.forName (driver);


Driver JDBCDriver = DriverManager.getDriver(url);

DriverManager.registerDriver(JDBCDriver);

Connection conn;

conn = DriverManager.getConnection(url, userid, passwd);

conn.setAutoCommit(false);

conn.setTransactionIsolation(Connection.TRANSACTION_REPEATABLE_READ);


// From the connection, you have to create a statement context.

ResultSet rset;

//Loop


int iSeqIx = 1;
int iJ;
long lTotElap = 0;
int iTotExec = 0;
for (iJ=0; iJ < 6; iJ++)
{
Date dateSt = new Date();

int iPersonGID = 3000;
int iPerFound = 0;
int iClrFound = 0;
int iEnd = 200;
if (iJ == 0) iEnd = 5;
for (int iX=0; iX < iEnd; iX++)
{
try
{
String strQuery;
Statement stmt;
iPersonGID++;
iTotExec++;

strQuery = "UPDATE person SET HomeServerCID =
HomeServerCID WHERE PersonGID = "
+ iPersonGID;
//System.out.println(strQuery);
stmt = conn.createStatement ();
iPerFound += stmt.executeUpdate(strQuery);
stmt.close();

if ((iX % 3) == 0)
{
conn.commit(); //Commit every 100 adds
}
}
catch (Exception except)
{
System.out.println("Exception caught, stack trace
follows:");
except.printStackTrace();
}
}
conn.commit();
Date dateEnd= new Date();
long lElap = dateEnd.getTime() - dateSt.getTime();
lTotElap += lElap;
System.out.println("200 statements" + " Elapsed millisec= " +
lElap);
System.out.println("Tot Person:" + iPerFound + " Clr: " +
iClrFound);

}
System.out.println("Total statements = " + iTotExec + " total elap=
" + lTotElap + " Avg Ms: " +
lTotElap*1.0 / (iTotExec));
//All Done with Startconnection loop here
}



public static void selectStatement ()
throws SQLException, ClassNotFoundException
{
//Change following to use prepared stmt or not
final boolean bPrep = false;
//Change following to use XLOCK or not
final boolean bXlock = false;

//Set fetch size to 0 or higher
final int iFetchSize = 0;

System.out.println("xlock or not: " + bXlock + " statement Prepared
or not: " + bPrep + " fetch size: " + iFetchSize);
Class.forName (driver);

//DriverManager.setLogStream(System.out) ; //Enable debug logging to
console

Driver JDBCDriver = DriverManager.getDriver(url);

DriverManager.registerDriver(JDBCDriver);

Connection conn;
//Following changes cursor mode:
//url = url + ";selectMethod=cursor";
conn = DriverManager.getConnection(url, userid, passwd);


conn.setAutoCommit(false);

conn.rollback();

conn.setTransactionIsolation(Connection.TRANSACTION_REPEATABLE_READ);


// From the connection, you have to create a statement context.

ResultSet rset;

String strXlock = "";
if (bXlock)
{
strXlock = " WITH (XLOCK)";
}
String strQuery = "SELECT HomeServerCID, FirstName, MiddleName,
LastName, PersonType, Pin, FacilityCode, Inactive, Disabled, ADA, Deleted,
Noticed, LastModDT, Text1, Text2, Text3, Text4, Text5, text6, text7, text8,
text9, Int1, Int2, Int3, Int4, Int5, Logical1, Logical2, Logical3, Logical4,
Date1, Date2, ActivateAPEvent, AssetAdministrator, ImageCaptureDT,
SignatureCaptureDT, PersonGID, LastModPersonGID, IsCCmUSer, HasBeenCCMUser" +
" FROM person" + strXlock + " WHERE PersonGID = ";
String strQueryPrep = strQuery + "?";

System.out.println(strQueryPrep);
PreparedStatement psSelPerBig = conn.prepareStatement(strQueryPrep);

int iSeqIx = 1;
int iJ;
long lTotElap = 0;
int iTotExec = 0;
for (iJ=0; iJ < 6; iJ++)
{
Date dateSt = new Date();

int iPersonGID = 3001;
int iPerFound = 0;
int iClrFound = 0;
int iEnd = 200;
Statement stmt = null;
if (iJ == 0) iEnd = 5;
for (int iX=0; iX < iEnd; iX++)
{
try
{
iPersonGID++;
iTotExec++;
//System.out.println(strQuery);
//This way for non-prepared XLOCK:
if (!bPrep)
{
stmt = conn.createStatement();
if (iFetchSize > 0) stmt.setFetchSize(iFetchSize);
//This affects performance a lot!!
stmt.executeQuery(strQuery + iPersonGID);
rset = stmt.getResultSet();
}
else
{
//Select person ID w/Prepared statement:
if (iFetchSize > 0)
psSelPerBig.setFetchSize(iFetchSize);
psSelPerBig.setInt(1, iPersonGID);
psSelPerBig.execute();
rset = psSelPerBig.getResultSet();
}
while (rset.next())
{
String strRes = rset.getString(1) +
rset.getString(2) + rset.getString(3);
iPerFound++;
}

rset.close();
if (!bPrep)
{
stmt.close();
}
if ((iX % 3) == 0)
{
conn.commit(); //Commit every 100 adds
}
}
catch (Exception except)
{
System.out.println("Exception caught, stack trace
follows:");
except.printStackTrace();
}
}
conn.commit();
Date dateEnd= new Date();
long lElap = dateEnd.getTime() - dateSt.getTime();
lTotElap += lElap;
System.out.println("200 statements" + " Elapsed millisec= " +
lElap);
System.out.println("Tot Person:" + iPerFound + " Clr: " +
iClrFound);

}
System.out.println("Total statements = " + iTotExec + " total elap=
" + lTotElap + " Avg Ms: " +
lTotElap*1.0 / (iTotExec));
//All Done with Startconnection loop here
}

}



"Evan T. Basalik (MSFT)" wrote:

> Bob,
>
> While we did not specifically target performance with the v1.2 driver beyond the Adapative Buffering changes, I am surprised that you are seeing slower
> performance with the v1.2 driver. Do you only see the problem with your custom database? Do you think the problem would reproduce against a generic
> database?
>
> Also, it looks like both your SELECT and UPDATE statement are restricted to a single table. If that is the case, then can you provide the definition for your
> table and your Java code? I should be able to use those to generate some sample data pretty easily so I can do a similar test in my environment.
>
> Evan
> --------------------
> >Thread-Topic: New JDBC 1.2 driver runs slower than JDBC 1.1 driver-- expected??
> >thread-index: Ach+02cBj6yAlt+wSw2Q7Yv4oIbaxA==
> >X-WBNR-Posting-Host: 63.69.129.2
> >From: =?Utf-8?B?Qm9iIEhlaW5nYXJ0bmVy?=
> >Subject: New JDBC 1.2 driver runs slower than JDBC 1.1 driver-- expected??
> >Date: Wed, 5 Mar 2008 07:13:01 -0800
> >Lines: 22
> >Message-ID:
> >MIME-Version: 1.0
> >Content-Type: text/plain;
> > charset="Utf-8"
> >Content-Transfer-Encoding: 7bit
> >X-Newsreader: Microsoft CDO for Windows 2000
> >Content-Class: urn:content-classes:message
> >Importance: normal
> >Priority: normal
> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2992
> >Newsgroups: microsoft.public.sqlserver.jdbcdriver
> >Path: TK2MSFTNGHUB02.phx.gbl
> >Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.jdbcdriver:453
> >NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
> >X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
> >
> >I have some test programs I run which do repeated simple SQL Select and SQL
> >update statements. These test programs consistently take 5 to 10% longer to
> >run with the new JDBC 1.2 driver than they do with the JDBC 1.1 driver. Is
> >this expected? I thought the new driver was supposed to be higher
> >performance, not lower performance. Here is the select statement I am doing:
> >
> >SELECT HomeServerCID, FirstName, MiddleName, LastName, PersonType, Pin,
> >FacilityCode, Inactive, Disabled, ADA, Deleted, Noticed, LastModDT, Text1,
> >Text2, Text3, Text4, Text5, text6, text7, text8, text9, Int1, Int2, Int3,
> >Int4, Int5, Logical1, Logical2, Logical3, Logical4, Date1, Date2,
> >ActivateAPEvent, AssetAdministrator, ImageCaptureDT, SignatureCaptureDT,
> >PersonGID, LastModPersonGID, IsCCmUSer, HasBeenCCMUser FROM person WHERE
> >PersonGID = xxxx
> >
> >Here is the update statement:
> >UPDATE person SET HomeServerCID = HomeServerCID WHERE PersonGID = xxxx
> >
> >(In both cases, xxxx varies in a loop so different records are selected.)
> >
> >
> >I can provide the complete java source code if needed, but you will also
> >need a database backup to run them.
> >
>
> Evan T. Basalik
> This posting is provided “AS IS” with no warranties, and confers no rights.
>
>
>
 >> Stay informed about: New JDBC 1.2 driver runs slower than JDBC 1.1 driver-- exp.. 
Back to top
Login to vote
Evan T. Basalik (MSFT)

External


Since: Nov 21, 2006
Posts: 24



(Msg. 5) Posted: Sun Mar 23, 2008 4:50 pm
Post subject: RE: New JDBC 1.2 driver runs slower than JDBC 1.1; my db definition [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Bob,

Hmm - that is a relatively complex table and the more I think about this, the more I think this issue would be better suited for the context of a support incident.
Given the nature of the positions of the Microsoft folks who monitor this newsgroup, we are not going to be able to give this issue the appropriate attention if it
stays just a newsgroup issue.

If you are interested in pursing this issue, please contact our Technical Routers. Please ask them to direct the case to me and I will be happy to work with
you on this performance issue.

Evan
--------------------
>Thread-Topic: New JDBC 1.2 driver runs slower than JDBC 1.1; my db definition
>thread-index: AciILog5lzS88EQsSqOz8qbnSi6uEg==
>X-WBNR-Posting-Host: 63.69.129.2
>From: =?Utf-8?B?Qm9iIEhlaW5nYXJ0bmVy?=
>References:
>Subject: RE: New JDBC 1.2 driver runs slower than JDBC 1.1; my db definition
>Date: Mon, 17 Mar 2008 05:58:01 -0700
>Lines: 236
>Message-ID:
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="Utf-8"
>Content-Transfer-Encoding: 8bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2992
>Newsgroups: microsoft.public.sqlserver.jdbcdriver
>Path: TK2MSFTNGHUB02.phx.gbl
>Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.jdbcdriver:466
>NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
>X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
>
>I do think this would happen in general, not just for my database; however, I
>do not have time right now to reproduce against a generic database. Both
>queries are against a single table (the person table)
>Here is the definition of this table:
>
>USE [ccc_glasgow_spey]
>GO
>/****** Object: Table [dbo].[Person] Script Date: 03/17/2008 08:51:21
>******/
>SET ANSI_NULLS ON
>GO
>SET QUOTED_IDENTIFIER ON
>GO
>CREATE TABLE [dbo].[Person](
> [HomeServerCID] [int] NULL,
> [PersonEUID] [nvarchar](40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
> [PersonGID] [decimal](19, 0) NOT NULL CONSTRAINT [DF_Person_PersonGID]
>DEFAULT ((0)),
> [FirstName] [nvarchar](63) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
>CONSTRAINT [DF_Person_FirstName] DEFAULT (''),
> [MiddleName] [nvarchar](60) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
>CONSTRAINT [DF_Person_MiddleName] DEFAULT (''),
> [LastName] [nvarchar](63) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
>CONSTRAINT [DF_Person_LastName] DEFAULT (''),
> [PersonType] [int] NOT NULL CONSTRAINT [DF_Person_PersonType] DEFAULT ((0)),
> [PIN] [int] NOT NULL CONSTRAINT [DF_Person_PIN] DEFAULT ((0)),
> [BadgeLayoutID] [int] NOT NULL CONSTRAINT [DF_Person_BadgeLayoutID]
>DEFAULT ((0)),
> [FacilityCode] [int] NOT NULL CONSTRAINT [DF_Person_FacilityCode] DEFAULT
>((0)),
> [Inactive] [bit] NOT NULL CONSTRAINT [DF_Person_Inactive] DEFAULT ((0)),
> [Disabled] [bit] NOT NULL CONSTRAINT [DF_Person_Disabled] DEFAULT ((0)),
> [ADA] [bit] NOT NULL CONSTRAINT [DF_Person_ADA] DEFAULT ((0)),
> [Deleted] [bit] NOT NULL CONSTRAINT [DF_Person_Deleted] DEFAULT ((0)),
> [Noticed] [bit] NOT NULL CONSTRAINT [DF_Person_Noticed] DEFAULT ((0)),
> [LastModDT] [int] NULL CONSTRAINT [DF_Person_LastModDT] DEFAULT ((0)),
> [GlobalLastModDT] [int] NULL CONSTRAINT [DF_Person_GlobalLastModDT]
>DEFAULT ((0)),
> [LastModPersonEUID] [nvarchar](40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
> [LastModPersonGID] [decimal](19, 0) NULL CONSTRAINT
>[DF_Person_LastModPersonGID] DEFAULT ((0)),
> [Text1] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
>CONSTRAINT [DF_Person_Text1] DEFAULT (''),
> [Text2] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
>CONSTRAINT [DF_Person_Text2] DEFAULT (''),
> [Text3] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
>CONSTRAINT [DF_Person_Text3] DEFAULT (''),
> [Text4] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
>CONSTRAINT [DF_Person_Text4] DEFAULT (''),
> [Text5] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
>CONSTRAINT [DF_Person_Text5] DEFAULT (''),
> [Int1] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int1] DEFAULT ((0)),
> [Int2] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int2] DEFAULT ((0)),
> [Int3] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int3] DEFAULT ((0)),
> [Int4] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int4] DEFAULT ((0)),
> [Int5] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int5] DEFAULT ((0)),
> [Logical1] [bit] NOT NULL CONSTRAINT [DF_Person_Logical1] DEFAULT ((0)),
> [Logical2] [bit] NOT NULL CONSTRAINT [DF_Person_Logical2] DEFAULT ((0)),
> [Date1] [datetime] NULL,
> [Date2] [datetime] NULL,
> [ActivateAPEvent] [bit] NOT NULL CONSTRAINT [DF_Person_ActivateAPEvent]
>DEFAULT ((0)),
> [AssetAdministrator] [bit] NOT NULL CONSTRAINT
>[DF_Person_AssetAdministrator] DEFAULT ((0)),
> [ImageCaptureDT] [int] NULL CONSTRAINT [DF_Person_ImageCaptureDT] DEFAULT
>((0)),
> [BadgePrintDT] [int] NULL CONSTRAINT [DF_Person_BadgePrintDT] DEFAULT ((0)),
> [SignatureCaptureDT] [int] NULL CONSTRAINT [DF_Person_SignatureCaptureDT]
>DEFAULT ((0)),
> [TransactionNum] [int] NOT NULL CONSTRAINT [DF_Person_TransactionNum]
>DEFAULT ((0)),
> [IsCcmUser] [bit] NOT NULL CONSTRAINT [DF_Person_IsCcmUser] DEFAULT ((0)),
> [HasBeenCcmUser] [bit] NOT NULL CONSTRAINT [DF_Person_HasBeenCcmUser]
>DEFAULT ((0)),
> [ImageReplicationCategory] [int] NOT NULL CONSTRAINT
>[DF_Person_ImageReplicationCategory] DEFAULT ((2)),
> [ImageLastModDT] [int] NULL CONSTRAINT [DF_Person_ImageLastModDT] DEFAULT
>((0)),
> [Temp] [bit] NOT NULL CONSTRAINT [DF_Person_Temp] DEFAULT ((0)),
> [CardLastModDT] [int] NULL CONSTRAINT [DF_Person_CardLastModDT] DEFAULT
>((0)),
> [PersonIdentifier] [decimal](20, 0) NOT NULL CONSTRAINT
>[DF_Person_PersonIdentifier] DEFAULT ((0)),
> [OrganizationalCategory] [decimal](20, 0) NOT NULL CONSTRAINT
>[DF_Person_OrganizationalCategory] DEFAULT ((0)),
> [OrganizationalIdentifier] [decimal](20, 0) NOT NULL CONSTRAINT
>[DF_Person_OrganizationalIdentifier] DEFAULT ((0)),
> [POAssociatCategory] [decimal](20, 0) NOT NULL CONSTRAINT
>[DF_Person_POAssociatCategory] DEFAULT ((0)),
> [Int6] [decimal](28, 0) NULL,
> [Int7] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int7] DEFAULT ((0)),
> [Int8] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int8] DEFAULT ((0)),
> [Int9] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int9] DEFAULT ((0)),
> [Logical3] [bit] NOT NULL CONSTRAINT [DF_Person_Logical3] DEFAULT ((0)),
> [Logical4] [bit] NOT NULL CONSTRAINT [DF_Person_Logical4] DEFAULT ((0)),
> [Date3] [datetime] NULL,
> [Date4] [datetime] NULL,
> [Text6] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL,
> [Text7] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL,
> [Text8] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>[DF_Person_Text8] DEFAULT (''),
> [Text9] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>[DF_Person_Text9] DEFAULT (''),
> [Text10] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>[DF_Person_Text10] DEFAULT (''),
> [Text11] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>[DF_Person_Text11] DEFAULT (''),
> [Text12] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>[DF_Person_Text12] DEFAULT (''),
> [Text13] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>[DF_Person_Text13] DEFAULT (''),
> [Text14] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>[DF_Person_Text14] DEFAULT (''),
> [Text15] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>[DF_Person_Text15] DEFAULT (''),
> [Text16] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>[DF_Person_Text16] DEFAULT (''),
> [Text17] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>[DF_Person_Text17] DEFAULT (''),
> [Text18] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>[DF_Person_Text18] DEFAULT (''),
> [Text19] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>[DF_Person_Text19] DEFAULT (''),
> [Text20] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>[DF_Person_Text20] DEFAULT (''),
> [Text21] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>[DF_Person_Text21] DEFAULT (''),
> [Text22] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>[DF_Person_Text22] DEFAULT (''),
> [Text23] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>[DF_Person_Text23] DEFAULT (''),
> [Text24] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>[DF_Person_Text24] DEFAULT (''),
> [Text25] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>[DF_Person_Text25] DEFAULT (''),
> CONSTRAINT [PK_Person] PRIMARY KEY CLUSTERED
>(
> [PersonGID] ASC
>)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
>) ON [PRIMARY]
>
>GO
>
>/** Many fields have indexes, they are all like this */
>USE [ccc_glasgow_spey]
>GO
>/****** Object: Index [FirstName] Script Date: 03/17/2008 08:54:43 ******/
>CREATE NONCLUSTERED INDEX [FirstName] ON [dbo].[Person]
>(
> [FirstName] ASC
>)WITH (PAD_INDEX = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF,
>IGNORE_DUP_KEY = OFF, ONLINE = OFF) ON [PRIMARY]
>
>/* Full list of fields with indexes, defined as above:
>FirstName
>FullName
>GlobalLastModDT
>Int1
>Int2
>Int6
>Int7
>LastModDT
>PersonEUID
>Text1
>Text2
>Text6
>Text7
>Text8
>Text9
>Text10

------------------------------------------------------------------------------------
>"Evan T. Basalik (MSFT)" wrote:
>
>> Bob,
>>
>> While we did not specifically target performance with the v1.2 driver beyond the Adapative Buffering changes, I am surprised that you are seeing slower
>> performance with the v1.2 driver. Do you only see the problem with your custom database? Do you think the problem would reproduce against a
generic
>> database?
>>
>> Also, it looks like both your SELECT and UPDATE statement are restricted to a single table. If that is the case, then can you provide the definition for
your
>> table and your Java code? I should be able to use those to generate some sample data pretty easily so I can do a similar test in my environment.
>>
>> Evan
>> --------------------
>> >Thread-Topic: New JDBC 1.2 driver runs slower than JDBC 1.1 driver-- expected??
>> >thread-index: Ach+02cBj6yAlt+wSw2Q7Yv4oIbaxA==
>> >X-WBNR-Posting-Host: 63.69.129.2
>> >From: =?Utf-8?B?Qm9iIEhlaW5nYXJ0bmVy?=
>> >Subject: New JDBC 1.2 driver runs slower than JDBC 1.1 driver-- expected??
>> >Date: Wed, 5 Mar 2008 07:13:01 -0800
>> >Lines: 22
>> >Message-ID:
>> >MIME-Version: 1.0
>> >Content-Type: text/plain;
>> > charset="Utf-8"
>> >Content-Transfer-Encoding: 7bit
>> >X-Newsreader: Microsoft CDO for Windows 2000
>> >Content-Class: urn:content-classes:message
>> >Importance: normal
>> >Priority: normal
>> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2992
>> >Newsgroups: microsoft.public.sqlserver.jdbcdriver
>> >Path: TK2MSFTNGHUB02.phx.gbl
>> >Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.jdbcdriver:453
>> >NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
>> >X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
>> >
>> >I have some test programs I run which do repeated simple SQL Select and SQL
>> >update statements. These test programs consistently take 5 to 10% longer to
>> >run with the new JDBC 1.2 driver than they do with the JDBC 1.1 driver. Is
>> >this expected? I thought the new driver was supposed to be higher
>> >performance, not lower performance. Here is the select statement I am doing:
>> >
>> >SELECT HomeServerCID, FirstName, MiddleName, LastName, PersonType, Pin,
>> >FacilityCode, Inactive, Disabled, ADA, Deleted, Noticed, LastModDT, Text1,
>> >Text2, Text3, Text4, Text5, text6, text7, text8, text9, Int1, Int2, Int3,
>> >Int4, Int5, Logical1, Logical2, Logical3, Logical4, Date1, Date2,
>> >ActivateAPEvent, AssetAdministrator, ImageCaptureDT, SignatureCaptureDT,
>> >PersonGID, LastModPersonGID, IsCCmUSer, HasBeenCCMUser FROM person WHERE
>> >PersonGID = xxxx
>> >
>> >Here is the update statement:
>> >UPDATE person SET HomeServerCID = HomeServerCID WHERE PersonGID = xxxx
>> >
>> >(In both cases, xxxx varies in a loop so different records are selected.)
>> >
>> >
>> >I can provide the complete java source code if needed, but you will also
>> >need a database backup to run them.
>> >
>>
>> Evan T. Basalik
>> This posting is provided “AS IS” with no warranties, and confers no rights.
>>
>>
>>
>

Evan T. Basalik
This posting is provided “AS IS” with no warranties, and confers no rights.
 >> Stay informed about: New JDBC 1.2 driver runs slower than JDBC 1.1 driver-- exp.. 
Back to top
Login to vote
Bob Heingartner

External


Since: Mar 05, 2008
Posts: 4



(Msg. 6) Posted: Mon Mar 24, 2008 5:51 am
Post subject: RE: New JDBC 1.2 driver runs slower than JDBC 1.1; my db definitio [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

1) If I manage to reproduce this same problem with a table from one of the
sample databases, would this still require a support incident?

2) If the support incident ends up verifying a slowdown in the new driver,
will that be considered a "no charge" support incident, because it found a
"bug", or will there still be a charge for the incident?

"Evan T. Basalik (MSFT)" wrote:

> Bob,
>
> Hmm - that is a relatively complex table and the more I think about this, the more I think this issue would be better suited for the context of a support incident.
> Given the nature of the positions of the Microsoft folks who monitor this newsgroup, we are not going to be able to give this issue the appropriate attention if it
> stays just a newsgroup issue.
>
> If you are interested in pursing this issue, please contact our Technical Routers. Please ask them to direct the case to me and I will be happy to work with
> you on this performance issue.
>
> Evan
> --------------------
> >Thread-Topic: New JDBC 1.2 driver runs slower than JDBC 1.1; my db definition
> >thread-index: AciILog5lzS88EQsSqOz8qbnSi6uEg==
> >X-WBNR-Posting-Host: 63.69.129.2
> >From: =?Utf-8?B?Qm9iIEhlaW5nYXJ0bmVy?=
> >References:
> >Subject: RE: New JDBC 1.2 driver runs slower than JDBC 1.1; my db definition
> >Date: Mon, 17 Mar 2008 05:58:01 -0700
> >Lines: 236
> >Message-ID:
> >MIME-Version: 1.0
> >Content-Type: text/plain;
> > charset="Utf-8"
> >Content-Transfer-Encoding: 8bit
> >X-Newsreader: Microsoft CDO for Windows 2000
> >Content-Class: urn:content-classes:message
> >Importance: normal
> >Priority: normal
> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2992
> >Newsgroups: microsoft.public.sqlserver.jdbcdriver
> >Path: TK2MSFTNGHUB02.phx.gbl
> >Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.jdbcdriver:466
> >NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
> >X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
> >
> >I do think this would happen in general, not just for my database; however, I
> >do not have time right now to reproduce against a generic database. Both
> >queries are against a single table (the person table)
> >Here is the definition of this table:
> >
> >USE [ccc_glasgow_spey]
> >GO
> >/****** Object: Table [dbo].[Person] Script Date: 03/17/2008 08:51:21
> >******/
> >SET ANSI_NULLS ON
> >GO
> >SET QUOTED_IDENTIFIER ON
> >GO
> >CREATE TABLE [dbo].[Person](
> > [HomeServerCID] [int] NULL,
> > [PersonEUID] [nvarchar](40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
> > [PersonGID] [decimal](19, 0) NOT NULL CONSTRAINT [DF_Person_PersonGID]
> >DEFAULT ((0)),
> > [FirstName] [nvarchar](63) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
> >CONSTRAINT [DF_Person_FirstName] DEFAULT (''),
> > [MiddleName] [nvarchar](60) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
> >CONSTRAINT [DF_Person_MiddleName] DEFAULT (''),
> > [LastName] [nvarchar](63) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
> >CONSTRAINT [DF_Person_LastName] DEFAULT (''),
> > [PersonType] [int] NOT NULL CONSTRAINT [DF_Person_PersonType] DEFAULT ((0)),
> > [PIN] [int] NOT NULL CONSTRAINT [DF_Person_PIN] DEFAULT ((0)),
> > [BadgeLayoutID] [int] NOT NULL CONSTRAINT [DF_Person_BadgeLayoutID]
> >DEFAULT ((0)),
> > [FacilityCode] [int] NOT NULL CONSTRAINT [DF_Person_FacilityCode] DEFAULT
> >((0)),
> > [Inactive] [bit] NOT NULL CONSTRAINT [DF_Person_Inactive] DEFAULT ((0)),
> > [Disabled] [bit] NOT NULL CONSTRAINT [DF_Person_Disabled] DEFAULT ((0)),
> > [ADA] [bit] NOT NULL CONSTRAINT [DF_Person_ADA] DEFAULT ((0)),
> > [Deleted] [bit] NOT NULL CONSTRAINT [DF_Person_Deleted] DEFAULT ((0)),
> > [Noticed] [bit] NOT NULL CONSTRAINT [DF_Person_Noticed] DEFAULT ((0)),
> > [LastModDT] [int] NULL CONSTRAINT [DF_Person_LastModDT] DEFAULT ((0)),
> > [GlobalLastModDT] [int] NULL CONSTRAINT [DF_Person_GlobalLastModDT]
> >DEFAULT ((0)),
> > [LastModPersonEUID] [nvarchar](40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
> > [LastModPersonGID] [decimal](19, 0) NULL CONSTRAINT
> >[DF_Person_LastModPersonGID] DEFAULT ((0)),
> > [Text1] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
> >CONSTRAINT [DF_Person_Text1] DEFAULT (''),
> > [Text2] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
> >CONSTRAINT [DF_Person_Text2] DEFAULT (''),
> > [Text3] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
> >CONSTRAINT [DF_Person_Text3] DEFAULT (''),
> > [Text4] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
> >CONSTRAINT [DF_Person_Text4] DEFAULT (''),
> > [Text5] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
> >CONSTRAINT [DF_Person_Text5] DEFAULT (''),
> > [Int1] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int1] DEFAULT ((0)),
> > [Int2] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int2] DEFAULT ((0)),
> > [Int3] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int3] DEFAULT ((0)),
> > [Int4] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int4] DEFAULT ((0)),
> > [Int5] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int5] DEFAULT ((0)),
> > [Logical1] [bit] NOT NULL CONSTRAINT [DF_Person_Logical1] DEFAULT ((0)),
> > [Logical2] [bit] NOT NULL CONSTRAINT [DF_Person_Logical2] DEFAULT ((0)),
> > [Date1] [datetime] NULL,
> > [Date2] [datetime] NULL,
> > [ActivateAPEvent] [bit] NOT NULL CONSTRAINT [DF_Person_ActivateAPEvent]
> >DEFAULT ((0)),
> > [AssetAdministrator] [bit] NOT NULL CONSTRAINT
> >[DF_Person_AssetAdministrator] DEFAULT ((0)),
> > [ImageCaptureDT] [int] NULL CONSTRAINT [DF_Person_ImageCaptureDT] DEFAULT
> >((0)),
> > [BadgePrintDT] [int] NULL CONSTRAINT [DF_Person_BadgePrintDT] DEFAULT ((0)),
> > [SignatureCaptureDT] [int] NULL CONSTRAINT [DF_Person_SignatureCaptureDT]
> >DEFAULT ((0)),
> > [TransactionNum] [int] NOT NULL CONSTRAINT [DF_Person_TransactionNum]
> >DEFAULT ((0)),
> > [IsCcmUser] [bit] NOT NULL CONSTRAINT [DF_Person_IsCcmUser] DEFAULT ((0)),
> > [HasBeenCcmUser] [bit] NOT NULL CONSTRAINT [DF_Person_HasBeenCcmUser]
> >DEFAULT ((0)),
> > [ImageReplicationCategory] [int] NOT NULL CONSTRAINT
> >[DF_Person_ImageReplicationCategory] DEFAULT ((2)),
> > [ImageLastModDT] [int] NULL CONSTRAINT [DF_Person_ImageLastModDT] DEFAULT
> >((0)),
> > [Temp] [bit] NOT NULL CONSTRAINT [DF_Person_Temp] DEFAULT ((0)),
> > [CardLastModDT] [int] NULL CONSTRAINT [DF_Person_CardLastModDT] DEFAULT
> >((0)),
> > [PersonIdentifier] [decimal](20, 0) NOT NULL CONSTRAINT
> >[DF_Person_PersonIdentifier] DEFAULT ((0)),
> > [OrganizationalCategory] [decimal](20, 0) NOT NULL CONSTRAINT
> >[DF_Person_OrganizationalCategory] DEFAULT ((0)),
> > [OrganizationalIdentifier] [decimal](20, 0) NOT NULL CONSTRAINT
> >[DF_Person_OrganizationalIdentifier] DEFAULT ((0)),
> > [POAssociatCategory] [decimal](20, 0) NOT NULL CONSTRAINT
> >[DF_Person_POAssociatCategory] DEFAULT ((0)),
> > [Int6] [decimal](28, 0) NULL,
> > [Int7] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int7] DEFAULT ((0)),
> > [Int8] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int8] DEFAULT ((0)),
> > [Int9] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int9] DEFAULT ((0)),
> > [Logical3] [bit] NOT NULL CONSTRAINT [DF_Person_Logical3] DEFAULT ((0)),
> > [Logical4] [bit] NOT NULL CONSTRAINT [DF_Person_Logical4] DEFAULT ((0)),
> > [Date3] [datetime] NULL,
> > [Date4] [datetime] NULL,
> > [Text6] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL,
> > [Text7] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL,
> > [Text8] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
> >[DF_Person_Text8] DEFAULT (''),
> > [Text9] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
> >[DF_Person_Text9] DEFAULT (''),
> > [Text10] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
> >[DF_Person_Text10] DEFAULT (''),
> > [Text11] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
> >[DF_Person_Text11] DEFAULT (''),
> > [Text12] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
> >[DF_Person_Text12] DEFAULT (''),
> > [Text13] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
> >[DF_Person_Text13] DEFAULT (''),
> > [Text14] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
> >[DF_Person_Text14] DEFAULT (''),
> > [Text15] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
> >[DF_Person_Text15] DEFAULT (''),
> > [Text16] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
> >[DF_Person_Text16] DEFAULT (''),
> > [Text17] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
> >[DF_Person_Text17] DEFAULT (''),
> > [Text18] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
> >[DF_Person_Text18] DEFAULT (''),
> > [Text19] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
> >[DF_Person_Text19] DEFAULT (''),
> > [Text20] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
> >[DF_Person_Text20] DEFAULT (''),
> > [Text21] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
> >[DF_Person_Text21] DEFAULT (''),
> > [Text22] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
> >[DF_Person_Text22] DEFAULT (''),
> > [Text23] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
> >[DF_Person_Text23] DEFAULT (''),
> > [Text24] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
> >[DF_Person_Text24] DEFAULT (''),
> > [Text25] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
> >[DF_Person_Text25] DEFAULT (''),
> > CONSTRAINT [PK_Person] PRIMARY KEY CLUSTERED
> >(
> > [PersonGID] ASC
> >)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
> >) ON [PRIMARY]
> >
> >GO
> >
> >/** Many fields have indexes, they are all like this */
> >USE [ccc_glasgow_spey]
> >GO
> >/****** Object: Index [FirstName] Script Date: 03/17/2008 08:54:43 ******/
> >CREATE NONCLUSTERED INDEX [FirstName] ON [dbo].[Person]
> >(
> > [FirstName] ASC
> >)WITH (PAD_INDEX = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF,
> >IGNORE_DUP_KEY = OFF, ONLINE = OFF) ON [PRIMARY]
> >
> >/* Full list of fields with indexes, defined as above:
> >FirstName
> >FullName
> >GlobalLastModDT
> >Int1
> >Int2
> >Int6
> >Int7
> >LastModDT
> >PersonEUID
> >Text1
> >Text2
> >Text6
> >Text7
> >Text8
> >Text9
> >Text10
>
> ------------------------------------------------------------------------------------
> >"Evan T. Basalik (MSFT)" wrote:
> >
> >> Bob,
> >>
> >> While we did not specifically target performance with the v1.2 driver beyond the Adapative Buffering changes, I am surprised that you are seeing slower
> >> performance with the v1.2 driver. Do you only see the problem with your custom database? Do you think the problem would reproduce against a
> generic
> >> database?
> >>
> >> Also, it looks like both your SELECT and UPDATE statement are restricted to a single table. If that is the case, then can you provide the definition for
> your
> >> table and your Java code? I should be able to use those to generate some sample data pretty easily so I can do a similar test in my environment.
> >>
> >> Evan
> >> --------------------
> >> >Thread-Topic: New JDBC 1.2 driver runs slower than JDBC 1.1 driver-- expected??
> >> >thread-index: Ach+02cBj6yAlt+wSw2Q7Yv4oIbaxA==
> >> >X-WBNR-Posting-Host: 63.69.129.2
> >> >From: =?Utf-8?B?Qm9iIEhlaW5nYXJ0bmVy?=
> >> >Subject: New JDBC 1.2 driver runs slower than JDBC 1.1 driver-- expected??
> >> >Date: Wed, 5 Mar 2008 07:13:01 -0800
> >> >Lines: 22
> >> >Message-ID:
> >> >MIME-Version: 1.0
> >> >Content-Type: text/plain;
> >> > charset="Utf-8"
> >> >Content-Transfer-Encoding: 7bit
> >> >X-Newsreader: Microsoft CDO for Windows 2000
> >> >Content-Class: urn:content-classes:message
> >> >Importance: normal
> >> >Priority: normal
> >> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2992
> >> >Newsgroups: microsoft.public.sqlserver.jdbcdriver
> >> >Path: TK2MSFTNGHUB02.phx.gbl
> >> >Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.jdbcdriver:453
> >> >NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
> >> >X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
> >> >
> >> >I have some test programs I run which do repeated simple SQL Select and SQL
> >> >update statements. These test programs consistently take 5 to 10% longer to
> >> >run with the new JDBC 1.2 driver than they do with the JDBC 1.1 driver. Is
> >> >this expected? I thought the new driver was supposed to be higher
> >> >performance, not lower performance. Here is the select statement I am doing:
> >> >
> >> >SELECT HomeServerCID, FirstName, MiddleName, LastName, PersonType, Pin,
> >> >FacilityCode, Inactive, Disabled, ADA, Deleted, Noticed, LastModDT, Text1,
> >> >Text2, Text3, Text4, Text5, text6, text7, text8, text9, Int1, Int2, Int3,
> >> >Int4, Int5, Logical1, Logical2, Logical3, Logical4, Date1, Date2,
> >> >ActivateAPEvent, AssetAdministrator, ImageCaptureDT, SignatureCaptureDT,
> >> >PersonGID, LastModPersonGID, IsCCmUSer, HasBeenCCMUser FROM person WHERE
> >> >PersonGID = xxxx
> >> >
> >> >Here is the update statement:
> >> >UPDATE person SET HomeServerCID = HomeServerCID WHERE PersonGID = xxxx
> >> >
> >> >(In both cases, xxxx varies in a loop so different records are selected.)
> >> >
> >> >
> >> >I can provide the complete java source code if needed, but you will also
> >> >need a database backup to run them.
> >> >
> >>
> >> Evan T. Basalik
> >> This posting is provided “AS IS” with no warranties, and confers no rights.
> >>
> >>
> >>
> >
>
> Evan T. Basalik
> This posting is provided “AS IS” with no warranties, and confers no rights.
>
>
>
 >> Stay informed about: New JDBC 1.2 driver runs slower than JDBC 1.1 driver-- exp.. 
Back to top
Login to vote
Evan T. Basalik (MSFT)

External


Since: Nov 21, 2006
Posts: 24



(Msg. 7) Posted: Tue Mar 25, 2008 8:34 pm
Post subject: RE: New JDBC 1.2 driver runs slower than JDBC 1.1; my db definitio [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Bob,

Unfortunately, I won't be able to know if this will be a paid support incident until after we figure out the source of the issue.

Evan

--------------------
>Thread-Topic: New JDBC 1.2 driver runs slower than JDBC 1.1; my db definitio
>thread-index: AciNrbcNF9Q5lokxRV2HjXyxiOKvlw==
>X-WBNR-Posting-Host: 63.69.129.2
>From: =?Utf-8?B?Qm9iIEhlaW5nYXJ0bmVy?=
>References: <C3946C59-8B78-
43DE-B654-46026277350E.RemoveThis@microsoft.com>
>Subject: RE: New JDBC 1.2 driver runs slower than JDBC 1.1; my db definitio
>Date: Mon, 24 Mar 2008 05:51:02 -0700
>Lines: 290
>Message-ID:
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="Utf-8"
>Content-Transfer-Encoding: 8bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2992
>Newsgroups: microsoft.public.sqlserver.jdbcdriver
>Path: TK2MSFTNGHUB02.phx.gbl
>Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.jdbcdriver:473
>NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
>X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
>
>1) If I manage to reproduce this same problem with a table from one of the
>sample databases, would this still require a support incident?
>
>2) If the support incident ends up verifying a slowdown in the new driver,
>will that be considered a "no charge" support incident, because it found a
>"bug", or will there still be a charge for the incident?
>
>"Evan T. Basalik (MSFT)" wrote:
>
>> Bob,
>>
>> Hmm - that is a relatively complex table and the more I think about this, the more I think this issue would be better suited for the context of a support
incident.
>> Given the nature of the positions of the Microsoft folks who monitor this newsgroup, we are not going to be able to give this issue the appropriate attention
if it
>> stays just a newsgroup issue.
>>
>> If you are interested in pursing this issue, please contact our Technical Routers. Please ask them to direct the case to me and I will be happy to work
with
>> you on this performance issue.
>>
>> Evan
>> --------------------
>> >Thread-Topic: New JDBC 1.2 driver runs slower than JDBC 1.1; my db definition
>> >thread-index: AciILog5lzS88EQsSqOz8qbnSi6uEg==
>> >X-WBNR-Posting-Host: 63.69.129.2
>> >From: =?Utf-8?B?Qm9iIEhlaW5nYXJ0bmVy?=
>> >References:
>> >Subject: RE: New JDBC 1.2 driver runs slower than JDBC 1.1; my db definition
>> >Date: Mon, 17 Mar 2008 05:58:01 -0700
>> >Lines: 236
>> >Message-ID:
>> >MIME-Version: 1.0
>> >Content-Type: text/plain;
>> > charset="Utf-8"
>> >Content-Transfer-Encoding: 8bit
>> >X-Newsreader: Microsoft CDO for Windows 2000
>> >Content-Class: urn:content-classes:message
>> >Importance: normal
>> >Priority: normal
>> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2992
>> >Newsgroups: microsoft.public.sqlserver.jdbcdriver
>> >Path: TK2MSFTNGHUB02.phx.gbl
>> >Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.jdbcdriver:466
>> >NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
>> >X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
>> >
>> >I do think this would happen in general, not just for my database; however, I
>> >do not have time right now to reproduce against a generic database. Both
>> >queries are against a single table (the person table)
>> >Here is the definition of this table:
>> >
>> >USE [ccc_glasgow_spey]
>> >GO
>> >/****** Object: Table [dbo].[Person] Script Date: 03/17/2008 08:51:21
>> >******/
>> >SET ANSI_NULLS ON
>> >GO
>> >SET QUOTED_IDENTIFIER ON
>> >GO
>> >CREATE TABLE [dbo].[Person](
>> > [HomeServerCID] [int] NULL,
>> > [PersonEUID] [nvarchar](40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
>> > [PersonGID] [decimal](19, 0) NOT NULL CONSTRAINT [DF_Person_PersonGID]
>> >DEFAULT ((0)),
>> > [FirstName] [nvarchar](63) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
>> >CONSTRAINT [DF_Person_FirstName] DEFAULT (''),
>> > [MiddleName] [nvarchar](60) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
>> >CONSTRAINT [DF_Person_MiddleName] DEFAULT (''),
>> > [LastName] [nvarchar](63) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
>> >CONSTRAINT [DF_Person_LastName] DEFAULT (''),
>> > [PersonType] [int] NOT NULL CONSTRAINT [DF_Person_PersonType] DEFAULT ((0)),
>> > [PIN] [int] NOT NULL CONSTRAINT [DF_Person_PIN] DEFAULT ((0)),
>> > [BadgeLayoutID] [int] NOT NULL CONSTRAINT [DF_Person_BadgeLayoutID]
>> >DEFAULT ((0)),
>> > [FacilityCode] [int] NOT NULL CONSTRAINT [DF_Person_FacilityCode] DEFAULT
>> >((0)),
>> > [Inactive] [bit] NOT NULL CONSTRAINT [DF_Person_Inactive] DEFAULT ((0)),
>> > [Disabled] [bit] NOT NULL CONSTRAINT [DF_Person_Disabled] DEFAULT ((0)),
>> > [ADA] [bit] NOT NULL CONSTRAINT [DF_Person_ADA] DEFAULT ((0)),
>> > [Deleted] [bit] NOT NULL CONSTRAINT [DF_Person_Deleted] DEFAULT ((0)),
>> > [Noticed] [bit] NOT NULL CONSTRAINT [DF_Person_Noticed] DEFAULT ((0)),
>> > [LastModDT] [int] NULL CONSTRAINT [DF_Person_LastModDT] DEFAULT ((0)),
>> > [GlobalLastModDT] [int] NULL CONSTRAINT [DF_Person_GlobalLastModDT]
>> >DEFAULT ((0)),
>> > [LastModPersonEUID] [nvarchar](40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
>> > [LastModPersonGID] [decimal](19, 0) NULL CONSTRAINT
>> >[DF_Person_LastModPersonGID] DEFAULT ((0)),
>> > [Text1] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
>> >CONSTRAINT [DF_Person_Text1] DEFAULT (''),
>> > [Text2] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
>> >CONSTRAINT [DF_Person_Text2] DEFAULT (''),
>> > [Text3] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
>> >CONSTRAINT [DF_Person_Text3] DEFAULT (''),
>> > [Text4] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
>> >CONSTRAINT [DF_Person_Text4] DEFAULT (''),
>> > [Text5] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
>> >CONSTRAINT [DF_Person_Text5] DEFAULT (''),
>> > [Int1] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int1] DEFAULT ((0)),
>> > [Int2] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int2] DEFAULT ((0)),
>> > [Int3] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int3] DEFAULT ((0)),
>> > [Int4] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int4] DEFAULT ((0)),
>> > [Int5] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int5] DEFAULT ((0)),
>> > [Logical1] [bit] NOT NULL CONSTRAINT [DF_Person_Logical1] DEFAULT ((0)),
>> > [Logical2] [bit] NOT NULL CONSTRAINT [DF_Person_Logical2] DEFAULT ((0)),
>> > [Date1] [datetime] NULL,
>> > [Date2] [datetime] NULL,
>> > [ActivateAPEvent] [bit] NOT NULL CONSTRAINT [DF_Person_ActivateAPEvent]
>> >DEFAULT ((0)),
>> > [AssetAdministrator] [bit] NOT NULL CONSTRAINT
>> >[DF_Person_AssetAdministrator] DEFAULT ((0)),
>> > [ImageCaptureDT] [int] NULL CONSTRAINT [DF_Person_ImageCaptureDT] DEFAULT
>> >((0)),
>> > [BadgePrintDT] [int] NULL CONSTRAINT [DF_Person_BadgePrintDT] DEFAULT ((0)),
>> > [SignatureCaptureDT] [int] NULL CONSTRAINT [DF_Person_SignatureCaptureDT]
>> >DEFAULT ((0)),
>> > [TransactionNum] [int] NOT NULL CONSTRAINT [DF_Person_TransactionNum]
>> >DEFAULT ((0)),
>> > [IsCcmUser] [bit] NOT NULL CONSTRAINT [DF_Person_IsCcmUser] DEFAULT ((0)),
>> > [HasBeenCcmUser] [bit] NOT NULL CONSTRAINT [DF_Person_HasBeenCcmUser]
>> >DEFAULT ((0)),
>> > [ImageReplicationCategory] [int] NOT NULL CONSTRAINT
>> >[DF_Person_ImageReplicationCategory] DEFAULT ((2)),
>> > [ImageLastModDT] [int] NULL CONSTRAINT [DF_Person_ImageLastModDT] DEFAULT
>> >((0)),
>> > [Temp] [bit] NOT NULL CONSTRAINT [DF_Person_Temp] DEFAULT ((0)),
>> > [CardLastModDT] [int] NULL CONSTRAINT [DF_Person_CardLastModDT] DEFAULT
>> >((0)),
>> > [PersonIdentifier] [decimal](20, 0) NOT NULL CONSTRAINT
>> >[DF_Person_PersonIdentifier] DEFAULT ((0)),
>> > [OrganizationalCategory] [decimal](20, 0) NOT NULL CONSTRAINT
>> >[DF_Person_OrganizationalCategory] DEFAULT ((0)),
>> > [OrganizationalIdentifier] [decimal](20, 0) NOT NULL CONSTRAINT
>> >[DF_Person_OrganizationalIdentifier] DEFAULT ((0)),
>> > [POAssociatCategory] [decimal](20, 0) NOT NULL CONSTRAINT
>> >[DF_Person_POAssociatCategory] DEFAULT ((0)),
>> > [Int6] [decimal](28, 0) NULL,
>> > [Int7] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int7] DEFAULT ((0)),
>> > [Int8] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int8] DEFAULT ((0)),
>> > [Int9] [decimal](28, 0) NULL CONSTRAINT [DF_Person_Int9] DEFAULT ((0)),
>> > [Logical3] [bit] NOT NULL CONSTRAINT [DF_Person_Logical3] DEFAULT ((0)),
>> > [Logical4] [bit] NOT NULL CONSTRAINT [DF_Person_Logical4] DEFAULT ((0)),
>> > [Date3] [datetime] NULL,
>> > [Date4] [datetime] NULL,
>> > [Text6] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL,
>> > [Text7] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL,
>> > [Text8] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>> >[DF_Person_Text8] DEFAULT (''),
>> > [Text9] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>> >[DF_Person_Text9] DEFAULT (''),
>> > [Text10] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>> >[DF_Person_Text10] DEFAULT (''),
>> > [Text11] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>> >[DF_Person_Text11] DEFAULT (''),
>> > [Text12] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>> >[DF_Person_Text12] DEFAULT (''),
>> > [Text13] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>> >[DF_Person_Text13] DEFAULT (''),
>> > [Text14] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>> >[DF_Person_Text14] DEFAULT (''),
>> > [Text15] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>> >[DF_Person_Text15] DEFAULT (''),
>> > [Text16] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>> >[DF_Person_Text16] DEFAULT (''),
>> > [Text17] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>> >[DF_Person_Text17] DEFAULT (''),
>> > [Text18] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>> >[DF_Person_Text18] DEFAULT (''),
>> > [Text19] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>> >[DF_Person_Text19] DEFAULT (''),
>> > [Text20] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>> >[DF_Person_Text20] DEFAULT (''),
>> > [Text21] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>> >[DF_Person_Text21] DEFAULT (''),
>> > [Text22] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>> >[DF_Person_Text22] DEFAULT (''),
>> > [Text23] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>> >[DF_Person_Text23] DEFAULT (''),
>> > [Text24] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>> >[DF_Person_Text24] DEFAULT (''),
>> > [Text25] [nvarchar](129) COLLATE Latin1_General_CI_AI NULL CONSTRAINT
>> >[DF_Person_Text25] DEFAULT (''),
>> > CONSTRAINT [PK_Person] PRIMARY KEY CLUSTERED
>> >(
>> > [PersonGID] ASC
>> >)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
>> >) ON [PRIMARY]
>> >
>> >GO
>> >
>> >/** Many fields have indexes, they are all like this */
>> >USE [ccc_glasgow_spey]
>> >GO
>> >/****** Object: Index [FirstName] Script Date: 03/17/2008 08:54:43 ******/
>> >CREATE NONCLUSTERED INDEX [FirstName] ON [dbo].[Person]
>> >(
>> > [FirstName] ASC
>> >)WITH (PAD_INDEX = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF,
>> >IGNORE_DUP_KEY = OFF, ONLINE = OFF) ON [PRIMARY]
>> >
>> >/* Full list of fields with indexes, defined as above:
>> >FirstName
>> >FullName
>> >GlobalLastModDT
>> >Int1
>> >Int2
>> >Int6
>> >Int7
>> >LastModDT
>> >PersonEUID
>> >Text1
>> >Text2
>> >Text6
>> >Text7
>> >Text8
>> >Text9
>> >Text10
>>
>> ------------------------------------------------------------------------------------
>> >"Evan T. Basalik (MSFT)" wrote:
>> >
>> >> Bob,
>> >>
>> >> While we did not specifically target performance with the v1.2 driver beyond the Adapative Buffering changes, I am surprised that you are seeing
slower
>> >> performance with the v1.2 driver. Do you only see the problem with your custom database? Do you think the problem would reproduce against a
>> generic
>> >> database?
>> >>
>> >> Also, it looks like both your SELECT and UPDATE statement are restricted to a single table. If that is the case, then can you provide the definition for
>> your
>> >> table and your Java code? I should be able to use those to generate some sample data pretty easily so I can do a similar test in my environment.
>> >>
>> >> Evan
>> >> --------------------
>> >> >Thread-Topic: New JDBC 1.2 driver runs slower than JDBC 1.1 driver-- expected??
>> >> >thread-index: Ach+02cBj6yAlt+wSw2Q7Yv4oIbaxA==
>> >> >X-WBNR-Posting-Host: 63.69.129.2
>> >> >From: =?Utf-8?B?Qm9iIEhlaW5nYXJ0bmVy?=
>> >> >Subject: New JDBC 1.2 driver runs slower than JDBC 1.1 driver-- expected??
>> >> >Date: Wed, 5 Mar 2008 07:13:01 -0800
>> >> >Lines: 22
>> >> >Message-ID:
>> >> >MIME-Version: 1.0
>> >> >Content-Type: text/plain;
>> >> > charset="Utf-8"
>> >> >Content-Transfer-Encoding: 7bit
>> >> >X-Newsreader: Microsoft CDO for Windows 2000
>> >> >Content-Class: urn:content-classes:message
>> >> >Importance: normal
>> >> >Priority: normal
>> >> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2992
>> >> >Newsgroups: microsoft.public.sqlserver.jdbcdriver
>> >> >Path: TK2MSFTNGHUB02.phx.gbl
>> >> >Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.jdbcdriver:453
>> >> >NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
>> >> >X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
>> >> >
>> >> >I have some test programs I run which do repeated simple SQL Select and SQL
>> >> >update statements. These test programs consistently take 5 to 10% longer to
>> >> >run with the new JDBC 1.2 driver than they do with the JDBC 1.1 driver. Is
>> >> >this expected? I thought the new driver was supposed to be higher
>> >> >performance, not lower performance. Here is the select statement I am doing:
>> >> >
>> >> >SELECT HomeServerCID, FirstName, MiddleName, LastName, PersonType, Pin,
>> >> >FacilityCode, Inactive, Disabled, ADA, Deleted, Noticed, LastModDT, Text1,
>> >> >Text2, Text3, Text4, Text5, text6, text7, text8, text9, Int1, Int2, Int3,
>> >> >Int4, Int5, Logical1, Logical2, Logical3, Logical4, Date1, Date2,
>> >> >ActivateAPEvent, AssetAdministrator, ImageCaptureDT, SignatureCaptureDT,
>> >> >PersonGID, LastModPersonGID, IsCCmUSer, HasBeenCCMUser FROM person WHERE
>> >> >PersonGID = xxxx
>> >> >
>> >> >Here is the update statement:
>> >> >UPDATE person SET HomeServerCID = HomeServerCID WHERE PersonGID = xxxx
>> >> >
>> >> >(In both cases, xxxx varies in a loop so different records are selected.)
>> >> >
>> >> >
>> >> >I can provide the complete java source code if needed, but you will also
>> >> >need a database backup to run them.
>> >> >
>> >>
>> >> Evan T. Basalik
>> >> This posting is provided “AS IS” with no warranties, and confers no rights.
>> >>
>> >>
>> >>
>> >
>>
>> Evan T. Basalik
>> This posting is provided “AS IS” with no warranties, and confers no rights.
>>
>>
>>
>

Evan T. Basalik
This posting is provided “AS IS” with no warranties, and confers no rights.
 >> Stay informed about: New JDBC 1.2 driver runs slower than JDBC 1.1 driver-- exp.. 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
MDX and JDBC Driver - Hi all, Anybody know if it possible to connect to an as2000 database and run mdx queries using the microsoft jdbc drivers? thanks, Peter

Register JDBC Driver - I'm new to Java and writing a test program to connect to a SQL Server 2000 database. I read and follow the instruction in KB article # Q313100. I have modifed the Classpath statement to include the 3 jar files. How do I register the driver? In the...

JDBC driver has issues with VARCHAR(24) - All of my VARCHAR(24) columns are reported as size 7 from java.sql.DatabaseMetaData::getColumns. All other sizes from 1 to 49 report the correct COLUMN_SIZE. Any ideas? The following program shows the problem (using 1.2.2828.100 against SQL Server....

2005 JDBC Driver: Integreated Authentication - Good evening, I am trying to get the new 2005 JDBC driver to use integrated authentication. I have tried adding the parameter -Djava.library.path=C:\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_<version>\enu\auth\x86 to the vm but I get an er...

Localized packages of the v1.2 JDBC driver now available -
   Database Help (Home) -> JDBC Driver All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]