![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
What does this mean? Thanks in advance |
#3
| ||||||
| ||||||
|
|
On Oct 14, 11:04*pm, rebelde <g... (AT) unixarea (DOT) de> wrote: What does this mean? Thanks in advance a. The AQP is generated internally, to override the normal QP, because you have specified: ___(INDEX koe_katkey) normally called "force index" or "index hints", and the way that is expedited, is to generate an AQP. Nothing surprising about that. the optimiser was rewritten in 15.0, so there are many things in it, and in its showplans, that will not be found in 12.5. The underlined lines are to be expected, that is not what is keeping this slow. |
|
b. I do not understand why you expect 12.5 and 15.0 binaries to match, syscall for syscall. Forget about that. Then you need to consider that ASE was very nicely bound to Sun/SPARC, you cannot expect the same from little old Suse, all the drivers are different. |
|
c. That (@3) is not a "single SELECT", it is a cursor, that fetches one row. A cursor is a particularly slow method of interacting with ASE. It is a set-oriented engine, not a row-processor. Even if you tweaked the configuration, it would not help an app that is sitting there, calling for one row at a time, processing it, calling for the next row. |
|
d. Although there have been many enhancements recently, to move large amounts of rows via client-side apps (eg. bulk-copy; arrays), (i) I doubt that ESQL/C was enhanced and (ii) you would have to change a little code to take advantage of such. So right now, you are executing row-processing commands, on the slowest CT-Lib library, without any code changes to take advantage of the new facilities. On a new smaller box. Using massively changed ASE. |
|
e. Why, exactly, are you using ESQL/C (or any client-side program for that matter), to unload large volumes of data, to a file system file ? |
|
Do you know, there are server-side utilities that perform that task 1,000s of times faster, and do not use the network ? If you must transfer data across the network, there are client-side utilities that perform that task 100s of times faster. |
#4
| |||||||||
| |||||||||
|
|
Firts of all, thanks for your fast and detailed answer. |
|
* * * * The type of query is DECLARE CURSOR. * * * * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
* * * * The type of query is OPEN CURSOR koe_daten_seq. * * * * The type of query is SELECT. * * * * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ i.e. in 12.5.3 it says 'query is SELECT' and in 15.0.3 it declares a new CURSOR: 'query is DECLARE CURSOR'; why? |
|
I do not expect that syscalls match, but I see the 0.0011 sec delay (spent in poll(2)) which underpins that 15.x ASE needs longer at this point; |
|
Normally the hit list of the SELECT is not only one row, but thousands; and it must be a CURSOR in the app to move back and forth (think in paging back and forth in some kind of sorted dictionary); |
|
We are talking about a high complex Library Management System with some 500 tables, written in C and ESQL/C and we can't so easy adopt on new Optimizer. At least we expect to get the old performance with the new ASE.. Is this to much expectation? :-) |
|
e. *Why, exactly, are you using ESQL/C ... cursor ... Because the netto data is stored in BLOBS which must be read and interpreted by the application; and: this (unloading) is only an example where the performance degree is easy to proof. In the dialog oriented part of the apps using the same interface it is only to 'feel' but not so easy to proof; that's why I picked this up; |
|
... server-side utilities ... client-side utilities ... 100s of times faster. I know, but this does not help here. |
|
The main question is: why is the same ESQL/C app with 15.0.3 twice as time slower reading rows as 12.5.4? |
#5
| |||
| |||
|
|
4. Other. ASE 15.0.3 has a totally re-written Optimiser; it took a while to bed it down. *The 12.5.x End of Life Notice coincided with the release of 15.5. *I never certified any 15.0.x release, they were all horrible. *ASE 15.5 is good. *Do not waste time going from 12.5.4 to 15.0.3 to 15.5; go directly to 15.5. 5. Attitude. You appear to be very app-centric, not at all friendly with ASE, expecting new binaries to service your app exactly the same as your 15- year-old out-of-date end-of-lifed binary. *That may not be the best way to serve your employer. *They made an investment in a Sybase Licence, that progresses with the times, not in a binary that will not change. *The 12.5.4 King is Dead, Long Live the 15.0 King ! *Release your happy past with the old king, get friendly with the new majesty, learn about it. Refuse to do that, and you will never get over the grief. *I can assure you the new one will serve you at least as well as the old one, and definitely better if you get friendly with it. Further, you will get far more performance out of your app, if you get to know ASE (old or new), and design the app for ASE, rather than in isolation from it. *I can guarantee at least 100 times better performance for each cursor that you replace with set-processing code, but that will only be attractive to you if you release your app- centrism, and wish to take advantage of the librarys Sybase Licence investment. |
#6
| |||
| |||
|
|
0.000085 recv(25, "\17\1\0!\0\0\0\0!\24\0\0\0\0open koe_daten_seq"...,2048, 0) = 33 0.000202 gettimeofday({1318924357, 741825}, NULL) = 0 0.001216 gettimeofday({1318924357, 743042}, NULL) = 0 0.000392 send(25, "\4\1\0\21\0\0\0\0\375\4\0\1\0\0\0\0\0", 17, 0) = 17 |
#7
| |||
| |||
|
|
so, we now know where the time in 15.x is spent: in CPU cycles, twice as much as in 12.x in this case of OPEN CURSOR |
#8
| |||||
| |||||
|
|
Have you noted [2.6] above, what is your RPSC ? |
|
3.1 How many engines ? |
|
3.2 How many CPU/cores/threads on the box ? |
|
3.3 What is the CPU/I.O/Idle from sp_symon (of at least one hour, including the cursor operating somewhere in this duration) ? |
|
3.4 Please confirm, you are running nothing but ASE on this box.. |
#9
| |||
| |||
|
|
12.5.4: The type of query is DECLARE CURSOR. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ vs 15.0.3: The type of query is OPEN CURSOR koe_daten_seq. The type of query is SELECT. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ i.e. in 12.5.3 it says 'query is SELECT' and in 15.0.3 it declares a new CURSOR: 'query is DECLARE CURSOR'; why? I think I mentioned, there is no possibility of matching either the QP, or the ShowPlan of the QP, line by line. *All this Showplan shows, is that 15.x produces two separate notices in the ShowPlan, where 12.5.3 produces one notice. *There is no "new" or second cursor, it is notifying the OPEN as well as the DECLARE. |
|
SYBASE: /opt/sybase/15.0.3 DATABASE: sisis DSQUERY: sisisSYB 1> select @@version Adaptive Server Enterprise/15.0.3/EBF 17777 ESD#4/P/Sun_svr4/OS 5.8/ase1503/276 8/32-bit/FBO/Thu Aug 26 12:39:12 2010 (1 row affected) 1> set showplan on 1> DECLARE koe_daten_seq CURSOR FOR SELECT SYB_IDENTITY_COL,* FROM koe_daten WHERE katkey=1 QUERY PLAN FOR STATEMENT 1 (at line 1). STEP 1 The type of query is DECLARE CURSOR. 1> open koe_daten_seq QUERY PLAN FOR STATEMENT 1 (at line 1). STEP 1 The type of query is OPEN CURSOR koe_daten_seq. QUERY PLAN FOR STATEMENT 1 (at line 1). STEP 1 The type of query is DECLARE CURSOR. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 operator(s) under root |ROOT:EMIT Operator (VA = 1) | | |SCAN Operator (VA = 0) | | FROM TABLE | | koe_daten | | Index : koe_katkey | | Forward Scan. | | Positioning by key. | | Keys are: | | katkey ASC | | Using I/O Size 4 Kbytes for index leaf pages. | | With LRU Buffer Replacement Strategy for index leaf pages. | | Using I/O Size 4 Kbytes for data pages. | | With LRU Buffer Replacement Strategy for data pages. 1> fetch koe_daten_seq QUERY PLAN FOR STATEMENT 1 (at line 1). STEP 1 The type of query is FETCH CURSOR koe_daten_seq. ( record deleted from log ) (1 row affected) 1> close koe_daten_seq QUERY PLAN FOR STATEMENT 1 (at line 1). STEP 1 The type of query is CLOSE CURSOR koe_daten_seq. `---- |
|
SYBASE: /opt/sybase/15.0.3 DATABASE: sisis DSQUERY: sisisSYB 1> select @@version Adaptive Server Enterprise/15.0.3/EBF 17777 ESD#4/P/Sun_svr4/OS 5.8/ase1503/276 8/32-bit/FBO/Thu Aug 26 12:39:12 2010 (1 row affected) 1> set showplan on 1> DECLARE d01buch_seq CURSOR FOR SELECT SYB_IDENTITY_COL,* FROM d01buch WHERE d01gsi="TEMP154742" QUERY PLAN FOR STATEMENT 1 (at line 1). STEP 1 The type of query is DECLARE CURSOR. 1> open d01buch_seq QUERY PLAN FOR STATEMENT 1 (at line 1). STEP 1 The type of query is OPEN CURSOR d01buch_seq. QUERY PLAN FOR STATEMENT 1 (at line 1). STEP 1 The type of query is SELECT. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FROM TABLE d01buch Nested iteration. Index : d01sig Forward Scan. Positioning by key. Keys are: d01gsi ASC Using I/O Size 4 Kbytes for index leaf pages. With LRU Buffer Replacement Strategy for index leaf pages. Using I/O Size 4 Kbytes for data pages. With LRU Buffer Replacement Strategy for data pages. 1> fetch d01buch_seq QUERY PLAN FOR STATEMENT 1 (at line 1). STEP 1 The type of query is FETCH CURSOR d01buch_seq. ( record deleted from log ) (1 row affected) 1> close d01buch_seq QUERY PLAN FOR STATEMENT 1 (at line 1). STEP 1 The type of query is CLOSE CURSOR d01buch_seq. `---- |
#10
| |||
| |||
|
|
Any comments on this? |
![]() |
| Thread Tools | |
| Display Modes | |
| |