Hello Holger,
What is ORDERED expression for?
I didn't found it in SapDb documentation.
Or is it a new fuature?

I'm using version 7.4.3.32

Regards, Dusan

On Mon, 19 Jul 2004 18:28:04 +0200, Becker, Holger <[EMAIL PROTECTED]> wrote:
Hello Dusan,

you could try to use an orderd hint but I'm not sure if this would help.
The syntax is

 select /*+ordered */
    logfile.*, car.name
  from logfile outer join car
  on logfile.car_id =  car.id

Kind regards
Holger

-----Ursprüngliche Nachricht-----
Von: Dusan Kolesar [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 19. Juli 2004 16:21
An: SAP DB mailing list
Betreff: Join performance


Hello,

I have two tables:
CREATE TABLE "ADMIN"."CAR"
(
        "ID"         Integer    NOT NULL    DEFAULT SERIAL (1),
        "TSTAMP"     Timestamp    DEFAULT TIMESTAMP,
        "PARENT_ID"  Integer    DEFAULT          -1,
        "IMAGE_ID"   Integer    DEFAULT          -1,
        "NAME"       Varchar (30) ASCII    DEFAULT ' ',
        "LON"        Integer    DEFAULT          -1,
        "LAT"        Integer    DEFAULT          -1,
       ...
        PRIMARY KEY ("ID")
)
CREATE TABLE "ADMIN"."LOGFILE"
(
        "ID"               Integer    NOT NULL    DEFAULT SERIAL (1),
        "TSTAMP"           Timestamp    DEFAULT TIMESTAMP,
        "SERVER_ID"        Integer    DEFAULT          -1,
        "SERVER_TYPE"      Integer    DEFAULT          -1,
        "CAR_ID"           Integer    DEFAULT          -1,
        "LON"              Integer    DEFAULT          -1,
        "LAT"              Integer    DEFAULT          -1,
       ...
        PRIMARY KEY ("ID")
)
CREATE INDEX IDX_LOGFILE_CARID ON LOGFILE(CAR_ID ASC)

Table LOGFILE contains 500 000 rows and table CAR 30 rows.
My select query with join takes very long time (aprox. 4-5 min):
select logfile.*, car.name from logfile outer join car on
logfile.car_id =
car.id
Is it posible to increase my query performance (some other
index, or ...)?

When I run
explain select logfile.*, car.name from logfile join car on
logfile.car_id
= car.id
the result is:
Tablename       |Column or Index    |Strategy
       |PageCount
--------------------------------------------------------------
----------------
CAR         |                   |TABLE SCAN
     |1                                 
LOGFILE     |IDX_LOGFILE_CARID  |JOIN VIA INDEXED COLUMN
|13802                                  
             |                   |RESULT IS COPIED   , COSTVALUE IS
|52468                                  


Thank yuo for yor advice. Regards, Dusan


-=x=- Skontrolované antivírovým programom NOD32


-- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to