[EMAIL PROTECTED] wrote:
> This might be a bit odd, but here we go..
>  
> I have some data in a table that has the following structure:
>  
[SNIP]

> The data is logged once a second. The StartTimeAndDate will be the same
> for the particular workpiece that I am interested in.
> I pull out the data with a select statement such as  "select
> `OutgoingPcntGgeDev` from gaugereportinglist where
> `StartTimeAndDate`="2006-03-02 09:36:09" This can give me, say, 3 to 4
> thousand rows. I am using BIRT (www.eclipse.org/birt) to do my
> reporting. These value are shown on a graph. However 3000 points on a
> small graph on a web page is a little over the top, and takes a long
> time to plot. Is there any way to select say, every 10th point without
> doing anything on the client side?                
> 

A cheap solution, with a user variable:

select
 `OutgoingPcntGgeDev` from gaugereportinglist where
 `StartTimeAndDate`="2006-03-02 09:36:09"
  and (@count := coalesce( @count, 0) + 1 ) % 10 = 0 ;

ciao
gmax

-- 
 _  _ _  _
(_|| | |(_|><  The Data Charmer
 _|
http://datacharmer.blogspot.com/


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to