on 2015 Mar 18 4:24 PM
Here's what they look like for a 16.0.0.2052 database busy doing SELECT and UPDATE operations, no INSERTs...
SELECT DB_PROPERTY ( 'IndAdd' ), DB_PROPERTY ( 'IndLookup' ); DB_PROPERTY('IndAdd'),DB_PROPERTY('IndLookup') '401941','150' SELECT Number, PropName, Value FROM sa_conn_properties() WHERE PropName IN ( 'IndAdd', 'IndLookup' ) ORDER BY Number, PropName; Number,PropName,Value 3,'IndAdd',80 3,'IndLookup',0 4,'IndAdd',9990 4,'IndLookup',0 5,'IndAdd',9990 5,'IndLookup',0 6,'IndAdd',9990 6,'IndLookup',0 7,'IndAdd',9990 7,'IndLookup',0 8,'IndAdd',9990 8,'IndLookup',0 9,'IndAdd',9990 9,'IndLookup',0 10,'IndAdd',9990 10,'IndLookup',0 ...
CREATE TABLE DBA.inventory ( -- 1,000,000 rows, 28M total = 27M table + 40k ext + 960k index, 30 bytes per row item_id /* PK */ INTEGER NOT NULL DEFAULT autoincrement, item_count INTEGER NOT NULL, item_name VARCHAR ( 1024 ) NOT NULL, updated_at TIMESTAMP NOT NULL DEFAULT timestamp, last_modified /* X */ TIMESTAMP NOT NULL DEFAULT timestamp, CONSTRAINT ASA78 PRIMARY KEY ( -- 356k item_id ) ); -- Parents of DBA.inventory -- none -- -- Children -- none -- CREATE INDEX inventory_ml ON DBA.inventory ( -- 604k last_modified );
DO WHILE lb_continuing ll_pkey = Rand ( 100 ) * 10000 + il_thread_index; ls_sql = "UPDATE inventory SET item_count = item_count + 1 WHERE item_id = " + String ( ll_pkey ) EXECUTE IMMEDIATE :ls_sql USING itr_sqlca; IF SQLCA.SQLCODE <> 0 THEN UPDATE thread_status SET thread_status.status = 'error', SQLDBCode = :SQLCA.SQLDBCode, SQLErrText = :SQLCA.SQLErrText WHERE thread_status.thread_index = :il_thread_index USING itr_sqlca; COMMIT USING itr_sqlca; lb_continuing = FALSE END IF
Request clarification before answering.
User | Count |
---|---|
75 | |
30 | |
9 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.