![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi all, DB2 LUW 9.5 FP5. Looking the following statement: 1) WITH T_MACHINE (MACHINE_ID) AS (SELECT * FROM (VALUES ('00144FFA113A849F6BA4432F'), ('00144FA0EF6084A0EF604329'), ('00144FAABFC284AABFC24339') ) AS X) SELECT SS.MACHINE_ID, TOTAL_STORAGE, TOTAL_USED, UNPARTITIONED_FREE, FILESYSTEM_FREE, TOTAL_FREE_SPACE, IS_EXTERNAL FROM VWS.V_EXTINT_STORAGE_SUMMARY SS INNER JOIN T_MACHINE T ON ( SS.MACHINE_ID = T.MACHINE_ID ) I get several tablescans, bad access plan and bad response time.. in others words, the pushdown does not works. ######## When I try: 2) SELECT SS.MACHINE_ID, TOTAL_STORAGE, TOTAL_USED, UNPARTITIONED_FREE, FILESYSTEM_FREE, TOTAL_FREE_SPACE, IS_EXTERNAL FROM VWS.V_EXTINT_STORAGE_SUMMARY SS WHERE SS.MACHINE_ID IN ( '00144FFA113A849F6BA4432F', '00144FA0EF6084A0EF604329', '00144FAABFC284AABFC24339' ) Good acces plan, IXScans, fast response time, the pushdown works fine! I would like to use the first way (1), because there is situations where the user can select a big amount of machine_ids. Any ideas? Thanks in advance. Bruno. |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
On Mar 23, 3:52*pm, Bruno Almeida <bruno.alme... (AT) automatos (DOT) com> wrote: Hi all, DB2 LUW 9.5 FP5. Looking the following statement: 1) WITH T_MACHINE (MACHINE_ID) AS (SELECT * FROM (VALUES ('00144FFA113A849F6BA4432F'), ('00144FA0EF6084A0EF604329'), ('00144FAABFC284AABFC24339') ) AS X) SELECT SS.MACHINE_ID, TOTAL_STORAGE, TOTAL_USED, UNPARTITIONED_FREE, FILESYSTEM_FREE, TOTAL_FREE_SPACE, IS_EXTERNAL FROM VWS.V_EXTINT_STORAGE_SUMMARY SS INNER JOIN T_MACHINE T ON ( SS.MACHINE_ID = T.MACHINE_ID ) I get several tablescans, bad access plan and bad response time.. in others words, the pushdown does not works. ######## When I try: 2) SELECT SS.MACHINE_ID, TOTAL_STORAGE, TOTAL_USED, UNPARTITIONED_FREE, FILESYSTEM_FREE, TOTAL_FREE_SPACE, IS_EXTERNAL FROM VWS.V_EXTINT_STORAGE_SUMMARY SS WHERE SS.MACHINE_ID IN ( '00144FFA113A849F6BA4432F', '00144FA0EF6084A0EF604329', '00144FAABFC284AABFC24339' ) Good acces plan, IXScans, fast response time, the pushdown works fine! I would like to use the first way (1), because there is situations where the user can select a big amount of machine_ids. Any ideas? Thanks in advance. Bruno. VWS.V_EXTINT_STORAGE_SUMMARY * a View ? Can you please paste the Structures/Text of the tables/views involved and also..the db2exfmt outputs for both Good and Bad Cheers.. Shashi Mannepalli |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
1) Aren't VWS.V_EXTINT_STORAGE_WIN and VWS.V_EXTINT_STORAGE_AIX views? 2) UNION ALL would be better to avoid unnecessary sort to eliminate duplicated rows. Each selected MACHINE_ID between UNIONed subselects must be diffrent. Because, SUBSTR(MACHINE_ID,21,2) are not overlapped with each UNIONed subselects. |
![]() |
| Thread Tools | |
| Display Modes | |
| |