Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MySQL++ - Programming with the C++ API to MySQL
MaxDB - Everything about MaxDB, formerly known as SAP DB
ODBC - ODBC with the MySQL Connector/ODBC driver
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
Subject: mysql openssl Question
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
Update one field with more fields from another table
Subject: Getting Identity after INSERT
ERROR 2002: Can 't connect to local MySQL server through socket
mysql test 4 1 fails with the gis test
Subject: MySQL Cluster Software
Downgrade Mysql from 4 to 3 23
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Can 't access mysql after kernel upgrade
Executing MySQL Commands From Within C Program
Comparing and writing out BLOBS
Subject: Re: Preventing Duplicate Entries
FULLTEXT query format question
Strange behavior, Table Level Permission
Does the binary log enabling affect the MySQL performances?
mysql:it 's a db not a dbms how it 's possible?!
mysql have same function mthod as Oracle decode()
 
optimizer is issue

optimizer is issue

2007-08-23       - By ??????? ???????

 Back
I'm using maxdb 7.6.00.16

if I'm execute select1 with "and i.cabId = c.CabId(+)" I have very bad
explain1 and long time executing, If I modify select2 " c.CabId(+) =
i.cabId "

select1:
   SELECT zakaz_temp.counter, TIMESTAMP(dateres, VALUE(timeres,
'00:00:00')) dateres, f.name finansname,
      i.kuo, r.tarif, i.resid, VALUE(r.researchtype, '?? ???????????')
researchtype, i.cito, i.comments,
      c.CabName cabid
    FROM GIS.finance f,
         GIS.Invest i,
         REFS.rtCabinets c,
         REFS.FullResType r,
    (SELECT invest_log.counter counter, updated FROM GIS.INVEST_LOG WHERE
      invest_log.cartnum = 6280 and updated >= '2007-08-23 17:50:09'
and type_action='I') zakaz_temp
    WHERE zakaz_temp.counter = i.counter(+)
        and r.resid(+) = i.resid
        and f.id = i.FinansID
        and i.cartnum = 6280
        and i.cabId = c.CabId(+)
    ORDER BY f.name, updated

EXPLAIN1:
GIS       INVEST_LOG         INVEST_LOG_CARTNUM  EQUAL CONDITION FOR
INDEX                     20238
                            CARTNUM                  (USED INDEX
COLUMN)                
         F                                      TABLE
SCAN                                        1
GIS       RTINVESTS          UNIQUE_RESID        INDEX
SCAN                                        1
                                                ONLY INDEX
ACCESSED                    
GIS       RTINVESTREVISIONS  UNIQUE_REVISION     JOIN VIA RANGE OF
MULTIPLE INDEXED COL.           1
                            INVESTID                 (USED INDEX
COLUMN)                
GIS       RTINVESTPROPS      UNIQUE_REVISION     JOIN VIA RANGE OF
MULTIPLE INDEXED COL.           1
                            INVESTID                 (USED INDEX
COLUMN)                
INTERNAL  TEMPORARY RESULT                       TABLE
SCAN                                      500
         I                  COUNTER             JOIN VIA KEY
COLUMN                          111630
         C                  CABID               JOIN VIA KEY
COLUMN                               1
                                                TABLE
HASHED                            
                                                     NO TEMPORARY
RESULTS CREATED      
                                                     RESULT IS COPIED  
, COSTVALUE IS         6812


select2:
   SELECT zakaz_temp.counter, TIMESTAMP(dateres, VALUE(timeres,
'00:00:00')) dateres, f.name finansname,
      i.kuo, r.tarif, i.resid, VALUE(r.researchtype, '?? ???????????')
researchtype, i.cito, i.comments,
      c.CabName cabid
    FROM GIS.finance f,
         GIS.Invest i,
         REFS.rtCabinets c,
         REFS.FullResType r,
    (SELECT invest_log.counter counter, updated FROM GIS.INVEST_LOG WHERE
      invest_log.cartnum = 6280 and updated >= '2007-08-23 17:50:09'
and type_action='I') zakaz_temp
    WHERE zakaz_temp.counter = i.counter(+)
        and r.resid(+) = i.resid
        and f.id = i.FinansID
        and i.cartnum = 6280
        and c.CabId(+) = i.cabId
    ORDER BY f.name, updated    

EXPLAIN2:
GIS       INVEST_LOG         INVEST_LOG_CARTNUM  EQUAL CONDITION FOR
INDEX                     20238
                            CARTNUM                  (USED INDEX
COLUMN)                
         I                  INVEST_CARTNUM      EQUAL CONDITION FOR
INDEX                    111630
                            CARTNUM                  (USED INDEX
COLUMN)                
         F                  ID                  JOIN VIA KEY
COLUMN                               1
                                                TABLE
HASHED                            
GIS       RTINVESTS          UNIQUE_RESID        JOIN VIA INDEXED
COLUMN                           1
                            RESID                    (USED INDEX
COLUMN)                
GIS       RTINVESTREVISIONS  UNIQUE_REVISION     JOIN VIA RANGE OF
MULTIPLE INDEXED COL.           1
                            INVESTID                 (USED INDEX
COLUMN)                
GIS       RTINVESTPROPS      UNIQUE_REVISION     JOIN VIA RANGE OF
MULTIPLE INDEXED COL.           1
                            INVESTID                 (USED INDEX
COLUMN)                
INTERNAL  TEMPORARY RESULT                       JOIN VIA KEY
RANGE                              500
                                                TABLE TEMPORARY
SORTED                  
                            COUNTER                  (USED SORT
COLUMN)                
         C                  CABID               JOIN VIA KEY
COLUMN                               1
                                                TABLE
HASHED                            
                                                     RESULT IS COPIED  
, COSTVALUE IS           86

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/maxdb?unsub=mysql@(protected)