X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3F5CE53848 for ; Tue, 29 Mar 2005 19:33:26 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 45530-02 for ; Tue, 29 Mar 2005 18:33:24 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.200]) by svr1.postgresql.org (Postfix) with ESMTP id BFE72533E9 for ; Tue, 29 Mar 2005 19:33:23 +0100 (BST) Received: by wproxy.gmail.com with SMTP id 68so676617wra for ; Tue, 29 Mar 2005 10:33:24 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=kyS9YP2UysK13lsh9nzRkrlpGNsXaSz/L+uFG3mRa/H1dFn3mKdj7IMNKTn/sAw1/UwWypQMt0ehfeyCjsyw4v4crruw5rEVpgrFDTHjpBu59xLbHe4ZOjoHu+jKzXo2pGGdIuTbzuSEQf12XAJGoC5q3UhC6D0Zt34N/X5JuEs= Received: by 10.54.27.4 with SMTP id a4mr1136593wra; Tue, 29 Mar 2005 10:33:24 -0800 (PST) Received: by 10.54.54.69 with HTTP; Tue, 29 Mar 2005 10:33:24 -0800 (PST) Message-ID: Date: Tue, 29 Mar 2005 15:33:24 -0300 From: Vinicius Bernardi Reply-To: Vinicius Bernardi To: pgsql-performance@postgresql.org Subject: Million of rows Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.398 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200503/642 X-Sequence-Number: 11347 Hi everybody... I'm new hear, and I will try to explain my problem, and maybe I can get a help... I'm writing a software for 3 years, and this software has the position GPS from vehicles, and other informations. My problem starts when I had to store all the data about the vehicles, about 1 or 2 months. Actually I had a table called DADO_LIDO, that I write all information and the primary key is DATA (GPS DAY+HOUR) and the VEHICLE IDENTIFY. Each vehicle trasmit 1 position by 30 seconds, so I have something like 2000 rows per vehicle/day. I already has 2 clients one with 4000 vehicles, and the other with 500 vehicles. My application was made in delphi using ZEOS that's permit me testing in mysql and postgres. I allready has the two databases. But now the problem starts when I has to select data from this vehicles about the history ( I store only 2 months ) something like 40 or 50 millions of data about 500 vehicles. Using the keys VEHICLE_ID and GPS_TIME, the perfomance is very low... I need some ideas for a better perfomance in this table using selects by PERIOD / VEHICLE PERIOD / VEHICLES PERIOD / VEHICLE / ( a bit test in 3 integer columns using logical operators ) Thanks for any help Vinicius Marques De Bernardi