473,851 Members | 2,032 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

optimize this?

IBM has a product for the VSE operating system called the VSAM Redirector.
It allows you to use VSAM to access RDBMS tables/views as if they were
actual VSAM files. We're doing a comparison right now between Oracle, which
we've been running in production for many years, and DB2, which we are just
starting with. One of the tests I am trying is to see how efficient the
VSAM Redirector works with DB2 versus Oracle.

Below are two types of statements. keygetstmt is used to retrieve a single
row using a unique key. fwdkeyseekstmt is used to get the next row
following the row retrieved by keygetstmt. (Now that I think about it I'm
not sure why keygetstmt is used at all, here, but that's neither here nor
there at this point.)

Anyway, DB2 seems to be significantly slower doing this. I don't know if
it's DB2 itself, how we have it set up, or that its running on different
(slower?) hardware. Below are the two statements followed by a 'dump'
showing the elapsed time. Odd numbered queries execute the keygetstmt
prepared statement. Even numbered queries execute the fwdkeyseekstmt
prepared statement.

The VSAM Redirector server is all written in Java, by the way, using JDBC.
For Oracle we're using oracle.jdbc.dri ver.OracleDrive r ("thin" driver). For
DB2 we're using com.ibm.db2.jcc .DB2Driver.

Oracle
keygetstmt =
"SELECT *
FROM VSAM_POSPAY_ISS UED_CHECKS
WHERE ACCOUNT_SERIAL_ NUMBER = ?"

fwdkeyseekstmt =
"SELECT UNIQRBACNT , ACCOUNT_SERIAL_ NUMBER
FROM ( SELECT UNIQRBACNT , ACCOUNT_SERIAL_ NUMBER
FROM VSAM_POSPAY_ISS UED_CHECKS
WHERE ACCOUNT_SERIAL_ NUMBER ?
ORDER BY ACCOUNT_SERIAL_ NUMBER )
WHERE ROWNUM < 2"

06:00:38:860 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #3 ---
06:00:38:870 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #4 ---
06:00:38:880 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #5 ---
06:00:38:880 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #6 ---
06:00:38:890 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #7 ---
06:00:38:890 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #8 ---
06:00:38:900 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #9 ---
06:00:38:900 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #10 ---
06:00:38:910 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #11 ---
06:00:38:910 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #12 ---
06:00:38:920 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #13 ---
06:00:38:920 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #14 ---
06:00:38:920 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #15 ---
06:00:38:930 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #16 ---
06:00:38:940 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #17 ---
06:00:38:940 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #18 ---
06:00:38:950 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #19 ---
06:00:38:950 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #20 ---
06:00:38:960 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #21 ---
06:00:38:960 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #22 ---

DB2
keygetstmt =
"SELECT *
FROM VSAM_POSPAY_ISS UED_CHECKS
WHERE ACCOUNT_SERIAL_ NUMBER = ?
FETCH FIRST 1 ROW ONLY
OPTIMIZE FOR 1 ROW FOR FETCH ONLY"

fwdkeyseekstmt =
"SELECT UNIQRBACNT , ACCOUNT_SERIAL_ NUMBER
FROM VSAM_POSPAY_ISS UED_CHECKS
WHERE ACCOUNT_SERIAL_ NUMBER ?
ORDER BY ACCOUNT_SERIAL_ NUMBER
FETCH FIRST 1 ROW ONLY
FOR FETCH ONLY
OPTIMIZE FOR 1 ROW "

06:01:00:271 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #3 ---
06:01:00:281 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #4 ---
06:01:00:451 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #5 ---
06:01:00:461 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #6 ---
06:01:00:632 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #7 ---
06:01:00:642 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #8 ---
06:01:00:822 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #9 ---
06:01:00:822 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #10 ---
06:01:00:992 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #11 ---
06:01:01:020 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #12 ---
06:01:01:172 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #13 ---
06:01:01:192 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #14 ---
06:01:01:363 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #15 ---
06:01:01:373 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #16 ---
06:01:01:543 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #17 ---
06:01:01:553 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #18 ---
06:01:01:723 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #19 ---
06:01:01:743 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #20 ---
06:01:01:913 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #21 ---
06:01:01:923 [VSAM_POSPAY_ISS UED_CHECKS,1] --- Database query #22 ---

Originally the DB2 statements did not include the "fetch first 1 row only"
clause. By adding that it sped it up quite a bit, actually, but still not
near Oracle's speed.

Any other things I might be able to use to speed things up? Because we are
emulating VSAM I don't think that doing a single select statement for all
rows and then fetching them from the cursor is what we want. Then again,
perhaps it is. But I'd like to keep things as close as possible to how they
are now, since it's not really our code anyway.

In the end we only really do random access (select for one an only one row
using the unique key), but I thought that this would be a somewhat
worthwhile test between the two. Perhaps not. If I simply select all rows
and be done with it then the speed is pretty comparable.

Thanks!
Frank
---
Frank Swarbrick
Senior Developer/Analyst - Mainframe Applications
FirstBank Data Corporation - Lakewood, CO USA
Aug 5 '06 #1
13 3130
Frank, is this Db2 for zOS?

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Aug 5 '06 #2
No, DB2 LUW v8.2.

Frank
>>Serge Rielau<sr*****@ ca.ibm.com08/04/06 7:39 PM >>>
Frank, is this Db2 for zOS?

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Aug 7 '06 #3
Care to post the db2exfmt output?

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Aug 7 '06 #4
This appears to be a command that must be run from the server machine...?
If I only have client access is there any way I can run this command (and
other "server" commands) without actually logging in to the server machine?
Actually, maybe it's good if the answer is no, so I have more reason to
pressure for getting access to the machine. But anyway...

Thanks,
Frank

---
Frank Swarbrick
Senior Developer/Analyst - Mainframe Applications
FirstBank Data Corporation - Lakewood, CO USA
>>Serge Rielau<sr*****@ ca.ibm.com08/07/06 10:56 AM >>>
Care to post the db2exfmt output?

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Aug 7 '06 #5
Frank Swarbrick wrote:
This appears to be a command that must be run from the server machine...?
If I only have client access is there any way I can run this command (and
other "server" commands) without actually logging in to the server machine?
Actually, maybe it's good if the answer is no, so I have more reason to
pressure for getting access to the machine. But anyway...
Well.. no data, no help.
db2exfmt is a tool which can run on the client, but needs a connection.
Also you need to create some meta-tables by running
sqllib/misc/EXPLAIN.DDL on the server.
Anyway the idea is to get the access plan. For all I care you may just
be missing an index....

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Aug 8 '06 #6
Serge Rielau<sr*****@ ca.ibm.com08/07/06 8:03 PM >>>
>Frank Swarbrick wrote:
>This appears to be a command that must be run from the server machine...?
>If I only have client access is there any way I can run this command
(and
>other "server" commands) without actually logging in to the server
machine?
>Actually, maybe it's good if the answer is no, so I have more reason to
pressure for getting access to the machine. But anyway...
Well.. no data, no help.
db2exfmt is a tool which can run on the client, but needs a connection.
Also you need to create some meta-tables by running
sqllib/misc/EXPLAIN.DDL on the server.
Anyway the idea is to get the access plan. For all I care you may just
be missing an index....
Haha, that was it. Missing an index. Well, I had an index, but it wasn't
quite the correct index. Now that I've added one it works like a charm. In
fact, it's now faster than the Oracle version! Which brings up another
slight difference...

Here is a describe of the table

Oracle:
SQLdescribe icm_pospay_issu ed_checks;
Name Null? Type
----------------------------------------- -------- ----------------
UNIQRBACNT NOT NULL NUMBER
GROUP_ID NOT NULL NUMBER
COMPANY_ID NOT NULL NUMBER
ACCOUNT_NUMBER NOT NULL VARCHAR2(16)
SERIAL_NUMBER NOT NULL NUMBER
AMOUNT NOT NULL NUMBER(11,2)
PAYEE_NAME VARCHAR2(150)
ISSUED_DATETIME NOT NULL DATE
CREATION_DATETI ME NOT NULL DATE
LAST_MTCE_USER_ PROFILE_ID NOT NULL NUMBER
LAST_MTCE_DATET IME NOT NULL DATE
LOCKED_USER_PRO FILE_ID NUMBER
LOCKED_DATETIME DATE
LOCKED_EXPIRY_D ATETIME DATE
ACCOUNT_TYPE NOT NULL CHAR(2)

DB2:
db2 =describe table icm_pospay_issu ed_checks

Column Type Type
name schema name Length Scale
Nulls
------------------------------ --------- ------------------ -------- -----
-----
UNIQRBACNT SYSIBM DECIMAL 31 0
No
GROUP_ID SYSIBM DECIMAL 31 0
No
COMPANY_ID SYSIBM DECIMAL 31 0
No
ACCOUNT_NUMBER SYSIBM VARCHAR 16 0
No
SERIAL_NUMBER SYSIBM DECIMAL 31 0
No
AMOUNT SYSIBM DECIMAL 11 2
No
PAYEE_NAME SYSIBM VARCHAR 150 0
Yes
ISSUED_DATETIME SYSIBM TIMESTAMP 10 0
No
CREATION_DATETI ME SYSIBM TIMESTAMP 10 0
No
LAST_MTCE_USER_ PROFILE_ID SYSIBM DECIMAL 31 0
No
LAST_MTCE_DATET IME SYSIBM TIMESTAMP 10 0
No
LOCKED_USER_PRO FILE_ID SYSIBM DECIMAL 31 0
Yes
LOCKED_DATETIME SYSIBM TIMESTAMP 10 0
Yes
LOCKED_EXPIRY_D ATETIME SYSIBM TIMESTAMP 10 0
Yes
ACCOUNT_TYPE SYSIBM CHARACTER 2 0
No
ACCOUNT_SERIAL_ NUMBER SYSIBM VARCHAR 19 0
No

The main difference between the two tables is that in DB2 there is an
additional column, ACCOUNT_SERIAL_ NUMBER. This is a "generated" column
defined as follows:
"ACCOUNT_SERIAL _NUMBER" VARCHAR(19) NOT NULL GENERATED ALWAYS AS
(CAST((SUBSTR(A CCOUNT_NUMBER, 1, 10) CONCAT SUBSTR(DIGITS(S ERIAL_NUMBER),
23, 9)) AS SYSIBM.VARCHAR( 19))) )

My index (the relevant one) is defined as:
ADD CONSTRAINT "ICM_ACCT_SERIA L" UNIQUE (("ACCOUNT_SERI AL_NUMBER");

On the Oracle side they are doing it a bit differently. There is no
"generated" column. Instead they do what they call a "function-based index"
where instead of indexing on a column you index on a function, such as
CAST((SUBSTR(AC COUNT_NUMBER, 1, 10) CONCAT SUBSTR(DIGITS(S ERIAL_NUMBER), 23,
9)) AS VARCHAR(19))
(though with slightly different wording)

Does DB2 have something similar to this "function-based indexing"? Using
the control center I couldn't see any option to do something like that.

The only reason I want to is to make my comparison as close to 'apples to
apples' as possible.

My original problem was I had my constraint defined as follows:
CONSTRAINT ICM_ACCT_SERIAL UNIQUE (ACCOUNT_NUMBER , SERIAL_NUMBER)
But it wasn't being used because the SELECT was on
CAST((SUBSTR(AC COUNT_NUMBER, 1, 10) CONCAT SUBSTR(DIGITS(S ERIAL_NUMBER), 23,
9)) AS VARCHAR(19)) (via a view).
Anyway...

One other question... In the above DB2 table, is ACCOUNT_SERIAL_ NUMBER a
logical column only, or does it actually physically exist in the database?

Hope I'm making some sense here.
Thanks!
Frank

---
Frank Swarbrick
Senior Developer/Analyst - Mainframe Applications
FirstBank Data Corporation - Lakewood, CO USA
Aug 8 '06 #7
Serge Rielau<sr*****@ ca.ibm.com08/07/06 8:03 PM >>>
>Frank Swarbrick wrote:
>This appears to be a command that must be run from the server machine...?
>If I only have client access is there any way I can run this command
(and
>other "server" commands) without actually logging in to the server
machine?
>Actually, maybe it's good if the answer is no, so I have more reason to
pressure for getting access to the machine. But anyway...
Well.. no data, no help.
db2exfmt is a tool which can run on the client, but needs a connection.
Also you need to create some meta-tables by running
sqllib/misc/EXPLAIN.DDL on the server.
Anyway the idea is to get the access plan. For all I care you may just
be missing an index....
Oh, one other thing. I cannot locate db2exfmt anywhere in the SQLLIB on my
PC. The docs say that it should be in the MISC folder, but all I have in
there is psapi.dll. Is this perhaps just a bad install?

Thanks,
Frank
DB2 beginner
---
Frank Swarbrick
Senior Developer/Analyst - Mainframe Applications
FirstBank Data Corporation - Lakewood, CO USA
Aug 8 '06 #8
Frank Swarbrick wrote:
Haha, that was it. Missing an index. Well, I had an index, but it wasn't
quite the correct index. Now that I've added one it works like a charm. In
fact, it's now faster than the Oracle version!
That's working as designed then :-)
Which brings up another slight difference...

Here is a describe of the table

Oracle:
SQLdescribe icm_pospay_issu ed_checks;
Name Null? Type
----------------------------------------- -------- ----------------
UNIQRBACNT NOT NULL NUMBER
....
UNIQRBACNT SYSIBM DECIMAL 31 0
Each of these DECIMAL(31, 0) takes 16 Bytes. I don't believe all these
columns
use 31 digits right? You can greatly reduce the footprint of the row by
At least reducing teh scale to whats really required. Perhaps even go to
a native type (like INTEGER). That will increase your bufferpool hit
ratio and make DB2 faster. (Then again you can go to DB2 9 and buy
compression if you are lazy but rich or otherwise charitably inclined to
help pay my mortgage ;-)
The main difference between the two tables is that in DB2 there is an
additional column, ACCOUNT_SERIAL_ NUMBER. This is a "generated" column
defined as follows:
"ACCOUNT_SERIAL _NUMBER" VARCHAR(19) NOT NULL GENERATED ALWAYS AS
(CAST((SUBSTR(A CCOUNT_NUMBER, 1, 10) CONCAT SUBSTR(DIGITS(S ERIAL_NUMBER),
23, 9)) AS SYSIBM.VARCHAR( 19))) )

My index (the relevant one) is defined as:
ADD CONSTRAINT "ICM_ACCT_SERIA L" UNIQUE (("ACCOUNT_SERI AL_NUMBER");

On the Oracle side they are doing it a bit differently. There is no
"generated" column. Instead they do what they call a "function-based index"
where instead of indexing on a column you index on a function, such as
CAST((SUBSTR(AC COUNT_NUMBER, 1, 10) CONCAT SUBSTR(DIGITS(S ERIAL_NUMBER), 23,
9)) AS VARCHAR(19))
(though with slightly different wording)

Does DB2 have something similar to this "function-based indexing"? Using
the control center I couldn't see any option to do something like that.
"expression generated" columns are the closest match to a function based
index. So you are doing apples to apples.
>
The only reason I want to is to make my comparison as close to 'apples to
apples' as possible.

My original problem was I had my constraint defined as follows:
CONSTRAINT ICM_ACCT_SERIAL UNIQUE (ACCOUNT_NUMBER , SERIAL_NUMBER)
But it wasn't being used because the SELECT was on
CAST((SUBSTR(AC COUNT_NUMBER, 1, 10) CONCAT SUBSTR(DIGITS(S ERIAL_NUMBER), 23,
9)) AS VARCHAR(19)) (via a view).
Right.
One other question... In the above DB2 table, is ACCOUNT_SERIAL_ NUMBER a
logical column only, or does it actually physically exist in the database?
It is a regular column.
In Oracle you would achieve the same effect by combining two before
triggers (insert and update) and a check constraint.
The advantage of the generated column over the function index is that
you have the perhaps expensive expression precomputed even when the
optimizer goes for a table scan (perhaps to do a hash join).
The downside is that it takes space in the row.
The imaginary logical column would be:
GENERATED BY REFERENCE (<expression>) which is not (yet) implemented. :-)

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Aug 8 '06 #9
Serge Rielau<sr*****@ ca.ibm.com08/08/06 3:45 PM >>>
>Frank Swarbrick wrote:
>Haha, that was it. Missing an index. Well, I had an index, but it
wasn't
>quite the correct index. Now that I've added one it works like a charm.
In
>fact, it's now faster than the Oracle version!
>That's working as designed then :-)
Well obviously! :-)
Which brings up another slight difference...

Here is a describe of the table

Oracle:
SQLdescribe icm_pospay_issu ed_checks;
Name Null? Type
----------------------------------------- -------- ----------------
UNIQRBACNT NOT NULL NUMBER
...
>UNIQRBACNT SYSIBM DECIMAL 31
0
>Each of these DECIMAL(31, 0) takes 16 Bytes. I don't believe all these
columns
use 31 digits right? You can greatly reduce the footprint of the row by
At least reducing teh scale to whats really required. Perhaps even go to
a native type (like INTEGER). That will increase your bufferpool hit
ratio and make DB2 faster. (Then again you can go to DB2 9 and buy
compression if you are lazy but rich or otherwise charitably inclined to
help pay my mortgage ;-)
Probably a good idea. The only reason I defined it this way is because the
Oracle version had the column defined as "NUMBER" which can be up to (38,0),
I think. And is actually, I believe, floating-point. Which is perhaps one
reason why the Oracle version was slower. If we were going to put the DB2
version in production I would trim down the size of these numeric fields.
>The main difference between the two tables is that in DB2 there is an
additional column, ACCOUNT_SERIAL_ NUMBER. This is a "generated" column
defined as follows:
"ACCOUNT_SERIAL _NUMBER" VARCHAR(19) NOT NULL GENERATED ALWAYS AS
(CAST((SUBSTR( ACCOUNT_NUMBER, 1, 10) CONCAT
SUBSTR(DIGITS(S ERIAL_NUMBER),
>23, 9)) AS SYSIBM.VARCHAR( 19))) )

My index (the relevant one) is defined as:
ADD CONSTRAINT "ICM_ACCT_SERIA L" UNIQUE (("ACCOUNT_SERI AL_NUMBER");

On the Oracle side they are doing it a bit differently. There is no
"generated" column. Instead they do what they call a "function-based
index"
>where instead of indexing on a column you index on a function, such as
CAST((SUBSTR(A CCOUNT_NUMBER, 1, 10) CONCAT SUBSTR(DIGITS(S ERIAL_NUMBER),
23,
>9)) AS VARCHAR(19))
(though with slightly different wording)

Does DB2 have something similar to this "function-based indexing"?
Using
>the control center I couldn't see any option to do something like that.
"expression generated" columns are the closest match to a function based
index. So you are doing apples to apples.
Cool. Just wanted to make sure I wasn't missing something.
>>
The only reason I want to is to make my comparison as close to 'apples
to
>apples' as possible.

My original problem was I had my constraint defined as follows:
CONSTRAINT ICM_ACCT_SERIAL UNIQUE (ACCOUNT_NUMBER , SERIAL_NUMBER)
But it wasn't being used because the SELECT was on
CAST((SUBSTR(A CCOUNT_NUMBER, 1, 10) CONCAT SUBSTR(DIGITS(S ERIAL_NUMBER),
23,
>9)) AS VARCHAR(19)) (via a view).
Right.
>One other question... In the above DB2 table, is ACCOUNT_SERIAL_ NUMBER
a
>logical column only, or does it actually physically exist in the
database?
>It is a regular column.
In Oracle you would achieve the same effect by combining two before
triggers (insert and update) and a check constraint.
The advantage of the generated column over the function index is that
you have the perhaps expensive expression precomputed even when the
optimizer goes for a table scan (perhaps to do a hash join).
The downside is that it takes space in the row.
I'm guessing that's one reason why DB2 is performing better here. Speed at
the expense of space.
>The imaginary logical column would be:
GENERATED BY REFERENCE (<expression>) which is not (yet) implemented. :-)
Hmm!

Thanks for all of the info! I am learning more every day. Hopefully can
retain it all. :-)

Frank
---
Frank Swarbrick
Senior Developer/Analyst - Mainframe Applications
FirstBank Data Corporation - Lakewood, CO USA
Aug 8 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2040
by: Tom Paquette | last post by:
Hi, Having made very good use of the ADO recordset Field indexes created by setting the Optimize property, I am thrashing through ADO.Net literature to identify the same functionality. Being unable to find it I assume I am missing something basic like indexes are always built on datasets. Is that so or if not how does one implement one? I am doing repeated searches of a two field 60,000 record table where both fields are almost always 7...
0
1801
by: Andreas Falck | last post by:
Hi, I ran the code below on two different versions, 4.0.14 and 4.0.16 respectively, both running RH 7.3 on intel. In version mysql server version 4.0.14 the SELECT privelege suffices for "optimize table", but (seemingly) the server version 4.0.16 requires INSERT as well. Is the INSERT privelege necessary for performing optimize in mysql
0
2028
by: Daniel | last post by:
Hi there, I recently came across an interesting option when right clicking on a project (Right click on the project -> properties -> Configuration Properties ->Build -> Optimize) There is an option in there to optimize the code, has anyone had any expeiance / problems with this option and were there any significant gains in performance by turning on this setting?
6
1535
by: Silly | last post by:
byte Name = new byte; uint len = (uint)Name.Length; uint err = MyFunction(devID, out Name, out len); When this code is run in release build with optimize code set to true, len is evaluated to 0. If it is run with optimize code set to false, len is evaluated as 256 (what i want). If I add an extra line of code after declaring len, like:
3
2828
by: Reddy | last post by:
The sql query for my datagrid returns 100, 000 records. But the datagrid should display 20 records per page. I am using datagrid paging, but it is taking too much time for the page to load. Is there any way I can optimize the speed. Any sample code would be great. Thanks, Reddy
3
4975
by: Sonnich | last post by:
While trying to shorten my files, I tried optimize table - later I found that I need: mysqlcheck -u root -p[password[ --all-databases --analyze --optimize (thanks to Markus Popp). But it gives this error: mysqlcheck: Got error: 1044: Access denied for user 'root'@'localhost' to database 'information_schema' when executing 'OPTIMIZE TABLE ... '
4
2037
by: Huaer.XC | last post by:
>From the following MySQL command: EXPLAIN SELECT * FROM t1 JOIN t2 ON (t1.id = t2.id) JOIN t3 ON t3.name = t1.name WHERE t1.id IN(123, 124); which result is: ------------------------------------------------------------------------------------- table type possible_key key key_len ref rows Extra t1 const PK, name PK 4 const 10 t3 const PK PK 4 const 10
15
2533
by: kenneth | last post by:
I was trying to use multiple thread to optimize my following code, but met some problems, anyone can help me? k are initialized. int computePot() { int i, j; for( i=0; i<500; i++ ) { for( j=0; j<i-1; j++ ) {
14
2540
by: andreyvul | last post by:
I have this loop (all variables are pointers): for (foo = bar; foo baz; foo--) *(foo+1) = *foo; How do I optimize the pointer swap so that it uses -- and ++ or unary +- instead of +1 (if possible - I don't want to have more #defines than code)? IOCCC winners can really help me with this :P
2
2096
by: pavanip | last post by:
Hi, I have an application like Optimize System Performance by using Memory speed, cpu speed and Disk speed. How to optimize memory speed,disk optimization and CPU optimization. Please provide me some sample source code to optimize system performance. Thanks pavani
0
11019
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10670
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10728
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7906
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5736
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5933
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4143
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3179
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.