List:Internals« Previous MessageNext Message »
From:Paul Cadach Date:April 3 2003 12:11pm
Subject:Re: suggestion for more efficient inner join algorithm
View as plain text  
Hi,

----- Original Message -----
From: "Dennis Haney" <davh@stripped>
To: "Tim Samshuijzen" <tim@stripped>
Cc: <internals@stripped>
Sent: Thursday, April 03, 2003 2:49 PM
Subject: Re: suggestion for more efficient inner join algorithm

[skipped]

> A "hack"; you can "reverse" the date you put in.
> eg. instead of
> insert into tbl whn=NOW();
> and select ... from tbl sort by whn desc;
> you do
> insert into tbl whn = NOW(), whenidx= UNIX_TIMESTAMP("2036-01-01
> 00:00:00") - UNIX_TIMESTAMP();
> and select ... from tbl sort by whenidx
> where whenidx is an int(11)

It's just a hack, real hack. If Tim's table contains about 5 millions records,
additional field enlarges data file for 4*5000000 ~= 20 Mb, and I don't know how
it will enlarge index file, but it will.

May be better is to realize reverse index walk for full descending sorts
(selects like ... order by a, b desc can't be optimized IMHO)?


WBR,
Paul.


Thread
suggestion for more efficient inner join algorithmTim Samshuijzen2 Apr
  • Re: suggestion for more efficient inner join algorithmDennis Haney3 Apr
    • Re: suggestion for more efficient inner join algorithmTim Samshuijzen3 Apr
  • Re: suggestion for more efficient inner join algorithmPaul Cadach3 Apr
    • Re: suggestion for more efficient inner join algorithmSasha Pachev3 Apr
      • Re: suggestion for more efficient inner join algorithmTim Samshuijzen4 Apr
  • Re: suggestion for more efficient inner join algorithmPeter Zaitsev3 Apr
    • Re: suggestion for more efficient inner join algorithmTim Samshuijzen3 Apr
      • Re: suggestion for more efficient inner join algorithmPeter Zaitsev3 Apr
      • Re: suggestion for more efficient inner join algorithmDavid Axmark7 Apr