Using PostGIS to compute graph data
I finally solved this using this scheme (not as simple as firstly expected):

SELECT ST_X(geom) as value, ST_Y(geom) as datetime from (
    select (ST_DumpPoints(simplifiedLine)).* as g1 from (
        SELECT ST_Simplify(ST_MakeLine(the_geom.resulted), 15) as simplifiedLine FROM (
            SELECT ST_MakePoint(value, extract(EPOCH FROM datetime)) as resulted FROM table 
            ORDER BY datetime ASC
        ) as the_geom
    ) as g   
) as pt


Hope that will help others.