Re: Re: No descending index ?

2002-12-17 Thread Steve Yates
One trick I have used in the past in other databases is to create your own descending index. If your field is say fieldA, when you enter a row into the table take the value of fieldA and subtract from 0, then put that in fieldB. Index fieldB and you now can order rows descending

No descending index ?

2002-12-16 Thread Mpu Gondrong
Hello mysql, I am currently building news portal with php and mysql, and quite surprised knowing mysql doesn't support descending index. Why ? I think this feature is really needed. For example I want to show the latest news (from last updates, not always everyday). With ascending

Re: No descending index ?

2002-12-16 Thread Dan Goodes
Hi, Can you just SELECT x, y, z FROM table WHERE condition ORDER BY timestamp_column DESC; ? -Dan On Tue, 17 Dec 2002, Mpu Gondrong wrote: Hello mysql, I am currently building news portal with php and mysql, and quite surprised knowing mysql doesn't support descending index

Re: No descending index ?

2002-12-16 Thread Daniel Kasak
Mpu Gondrong wrote: Hello mysql, I am currently building news portal with php and mysql, and quite surprised knowing mysql doesn't support descending index. Why ? I think this feature is really needed. For example I want to show the latest news (from last updates, not always

Re: No descending index ?

2002-12-16 Thread Jeremy Zawodny
On Tue, Dec 17, 2002 at 07:37:17AM +0700, Mpu Gondrong wrote: Hello mysql, I am currently building news portal with php and mysql, and quite surprised knowing mysql doesn't support descending index. Why ? I think this feature is really needed. For example I want to show

Re: No descending index ?

2002-12-16 Thread Daniel Kasak
Mpu Gondrong wrote: Selasa, 17/12/2002 7:38:52, Daniel menulis: DK What's wrong with using: order by MyIndex DESC If I have 100 rows and mysql calculates with desc got 90 or more (30%) rows, index won't be used. I have thousand rows, and just want to get the last row. Without index,

Re[2]: No descending index ?

2002-12-16 Thread Mpu Gondrong
Selasa, 17/12/2002 7:47:38, Jeremy menulis: JZ I'm not quite sure what you're after, but MySQL 4.0 has support JZ for reading indexes in reverse order in some circumstances. This JZ greatly speeds up some queries that were slow in 3.23. I'm using MySQL 4.0.4-beta. For example: EXPLAIN

Re: Re[2]: No descending index ?

2002-12-16 Thread Jocelyn Fournier
Gondrong [EMAIL PROTECTED] To: Jeremy Zawodny [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 1:13 AM Subject: Re[2]: No descending index ? Selasa, 17/12/2002 7:47:38, Jeremy menulis: JZ I'm not quite sure what you're after, but MySQL 4.0 has support JZ for reading indexes in reverse

Re[4]: No descending index ?

2002-12-16 Thread Mpu Gondrong
weird if ascending index used for descending query. I'm not talking about returning correct result set (either order by desc, limit, etc), but avoid table scan. This is my first serious mysql application, as usually i'm using Interbase where has descending index feature. Well..., any