This is first time i am working with huge database ( 100 million rows in table Events).
Use case here is to quickly select and insert x and y for selected Organisation and datetime.
My database knowledge is very basic, so could you please provide me some tips/articles/best practices for situations like my ( huge table, about 500 inserts per second, required fast selects (maximum delay from inserting data to selecting it is 3 seconds).
Also - is there any mistakes in my schema ? ( http://sqlfiddle.com/#!6/24bc5 ).
CREATE TABLE [dbo].[Organisations]( [Id] [int] IDENTITY(1,1) NOT NULL, [Name] [nchar](100) NOT NULL, CONSTRAINT [PK_Organisation] PRIMARY KEY (Id) ) ; CREATE TABLE [dbo].[Events]( [Id] [int] IDENTITY(1,1) NOT NULL, [OrganisationId] [int] NOT NULL, [x] [decimal](18, 10) NOT NULL, [y] [decimal](18, 10) NOT NULL, [datetime] [datetime] NOT NULL, CONSTRAINT [PK_Events] PRIMARY KEY (Id)) ; CREATE NONCLUSTERED INDEX [EVENTS_INDEX] ON [dbo].[Events] ( [OrganisationId] ASC, [datetime] ASC ) INCLUDE ( [Id], [x], [y]); ALTER TABLE [dbo].[Events] WITH CHECK ADD CONSTRAINT [fk_events_organisations] FOREIGN KEY([OrganisationId]) REFERENCES [dbo].[Organisations] ([Id]) GO