Chris Don't know what database you will use but Firebird likes this combination a lot : less unique value column, more unique value column, and the second this is that Firebird in this case can use primary key in select with: where sensorID = :sensorID
Check the plan that your query returns... Marcin ----- Original Message ----- From: "Chris Stebbing" <[EMAIL PROTECTED]> To: "Moderated discussion list about database programming with Borland'sDelphi" <delphi-db@elists.org> Sent: Thursday, June 12, 2008 1:42 PM Subject: Re: Database Design Question > At 06:03 PM 12/06/08, Marcin Bury wrote: > >>Chris >> >>The answer is ONE table - perfomance is the matter of proper indexes... >> >>I would recommend create compund primary key for this table - SENSOR_ID, >>UNIQUE_COLUMN > > Hi Marcin, > > thanks for your response. The current primary key is timestamp, > sensor_id but sensorid, timestamp would work just as well and may > prove a little better I suspect. > > Cheers, > Chris. > > -------------------------------------------------------------------------------- > _______________________________________________ > Delphi-DB mailing list > Delphi-DB@elists.org > http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-db > _______________________________________________ Delphi-DB mailing list Delphi-DB@elists.org http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-db