public class IndexScanTest extends JDBCPerfTestCase
| Modifier and Type | Field and Description |
|---|---|
private java.sql.PreparedStatement |
preparedStmt
The prepared statement for the SQL expression that we want to test.
|
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE| Modifier | Constructor and Description |
|---|---|
private |
IndexScanTest(java.lang.String name,
int iterations,
int repeats)
Create an instance of the test.
|
| Modifier and Type | Method and Description |
|---|---|
void |
decimal10columns()
Test the performance of an index scan on a compound index on ten
DECIMAL(10,10) columns.
|
void |
decimal1column()
Test the performance of an index scan on a DECIMAL(10,10) column.
|
private static void |
fillWithRandomChars(java.util.Random r,
char[] chars)
Fill a
char array with random characters. |
private java.sql.PreparedStatement |
getOrPrepareStatement(java.lang.String sql)
Get the prepared statement that we use in the test.
|
static junit.framework.Test |
suite()
Create a test suite with all the test cases in this class.
|
protected void |
tearDown()
Do the necessary clean-up after running the test.
|
void |
varchar10()
Test the performance of an index scan on a VARCHAR(10) column.
|
void |
varchar100()
Test the performance of an index scan on a VARCHAR(100) column.
|
void |
varchar1000()
Test the performance of an index scan on a VARCHAR(1000) column.
|
void |
varcharAll()
Test the performance of an index scan with a compound index on
columns with type VARCHAR(10), VARCHAR(100) and VARCHAR(1000).
|
runBareOverridable, runTestassertCallError, assertCheckTable, assertCompileError, assertEquals, assertEquals, assertEquals, assertEquivalentDataType, assertErrorCode, assertGetIntError, assertNextError, assertPreparedStatementError, assertSQLExceptionEquals, assertSQLState, assertSQLState, assertStatementError, assertStatementError, assertStatementError, assertStatementError, assertStatementErrorUnordered, assertTableRowCount, assertUpdateCount, assertUpdateCount, assertWarning, checkAllConsistency, checkEstimatedRowCount, closeStatement, commit, createStatement, createStatement, createStatement, dropTable, dropTable, dropView, dropView, emptyStatementCache, getClientTransactionID, getConnection, getDatabaseProperty, getLastSQLException, initializeConnection, openConnection, openDefaultConnection, openDefaultConnection, openDefaultConnection, openUserConnection, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, rollback, runBare, runScript, runScript, runSQLCommands, setAutoCommit, usingDB2Client, usingDerbyNetClient, usingEmbeddedalarm, assertDirectoryDeleted, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertLaunchedJUnitTestMethod, assertLaunchedJUnitTestMethod, assertSecurityManager, assertThrowableEquals, currentDirectory, execJavaCmd, execJavaCmd, fail, getClassVersionMajor, getEmmaJar, getFailureFolder, getFilesWith, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, hasInterruptibleIO, isCVM, isIBMJVM, isJ9Platform, isJava5, isJava7, isJava8, isPhoneME, isPlatform, isSunJVM, isWindowsPlatform, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeFiles, removeSystemProperty, runsWithEmma, runsWithJaCoCo, setSystemProperty, sleep, sleepAtLeastOneTick, traceitassertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, setName, setUp, toStringprivate java.sql.PreparedStatement preparedStmt
private IndexScanTest(java.lang.String name,
int iterations,
int repeats)
name - the name of the method to call in the testiterations - the number of iteration in each test runrepeats - the number of times each test run is repeatedprivate java.sql.PreparedStatement getOrPrepareStatement(java.lang.String sql)
throws java.sql.SQLException
sql - the SQL text to prepare if the statement isn't already
compiledjava.sql.SQLExceptionprotected void tearDown()
throws java.lang.Exception
tearDown in class BaseJDBCTestCasejava.lang.Exceptionpublic static junit.framework.Test suite()
private static void fillWithRandomChars(java.util.Random r,
char[] chars)
char array with random characters.r - a random number generatorchars - the array to fillpublic void varchar10()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void varchar100()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void varchar1000()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void varcharAll()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void decimal1column()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void decimal10columns()
throws java.sql.SQLException
java.sql.SQLExceptionApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.