Sort multiple fields consumes more CPU time and RAM

This is a discussion on Sort multiple fields consumes more CPU time and RAM within the MySQL Database forums, part of the Database Forums category; Hello everybody, I have a little problem with some queries using multiple ORDER BY ... ASC/DESC and they are really ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-05-2006
JalaL
 
Posts: n/a
Default Sort multiple fields consumes more CPU time and RAM

Hello everybody,

I have a little problem with some queries using multiple ORDER BY ...
ASC/DESC and they are really slow. I was thinking to do some mathematical
calculation in order to calculate the best ratio that will keep the order of
all my fields as if it was done with an usual multiple ORDER BY... sql
query.

The idea is to calculate that ratio in the SELECT query; and sort ONLY ONCE
the result of my query.

The ratio can be calculated from the LENGTH() of some VARCHAR fields, and
some other INT fiealds

Can somebody help with some maths please :)


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:36 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0