Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. create table t (int o, k varchar(100), v varchar(100))
  2.  
  3. create index ixt on t ( v )
  4.  
  5. for (i = 0; i < 100*1000*1000; i++) {
  6. insert into t (o,k,v) values (i,'k1','v1');
  7. insert into t (o,k,v) values (i,'k2', Convert(i, varchar));
  8. }
  9.  
  10. 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=?
  11.  
  12. 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'
  13.  
  14. connection con=null;
  15. String sql="select * from employee where id=5";
  16. Statement st=conn.createStatement();
  17.  
  18. connection con=null;
  19. String sql="select * from employee where id=?";
  20. PreparedStatement ps=conn.prepareStatement(sql);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement