Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create table t (int o, k varchar(100), v varchar(100))
- create index ixt on t ( v )
- for (i = 0; i < 100*1000*1000; i++) {
- insert into t (o,k,v) values (i,'k1','v1');
- insert into t (o,k,v) values (i,'k2', Convert(i, varchar));
- }
- select o,p,v from t as tx, t as ty where tx.o=ty.o and tx.k=? and tx.v=? and ty.k=? and ty.v=?
- select o,p,v from t as tx, t as ty where tx.o=ty.o and tx.k='k1' and tx.v='v1' and ty.k='k2' and ty.v='1234'
- connection con=null;
- String sql="select * from employee where id=5";
- Statement st=conn.createStatement();
- connection con=null;
- String sql="select * from employee where id=?";
- PreparedStatement ps=conn.prepareStatement(sql);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement