Click here to Skip to main content
15,893,161 members

Comments by Member 14921707 (Top 14 by date)

Member 14921707 1-Nov-21 13:55pm View    
30 rows with 27 column
Member 14921707 1-Nov-21 13:52pm View    
currently i am working on 30 list, imagine what if i have 200,000 guest, which is common in my case! i know it related with my computer memory, some time it work like charm and some time it take more than 7 sec! after the problem i run in my sql which fast then test in from the app it became ok!
Member 14921707 1-Nov-21 13:48pm View    
here is my sp

```
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[sp_loadGuest]
-- Add the parameters for the stored procedure here
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

-- Insert statements for procedure here
select g.id as 'id',
g.name as 'Name',
g.host_by as 'Host By',
g.purpose_of_visit as 'Purpose Of Visit',
g.companyName as 'Company Name',
g.occupication as 'Occupication',
g.address as 'Address',
g.city as 'City',
g.country as 'Country',
g.contact_no as 'CountactNo' ,
g.email as 'Email',
g.profile_image as 'profile Image' ,
g.doc1_image as 'Doc1 Image',
g.doc2_image as 'Doc2 Image',
g.gender as 'Gender',
g.religion as 'Religion',
idType.card_type as 'Id Type',
g.id_no as 'Id No',
g.note as 'Note',
g.created_at as 'Created At',
g.updated_at as 'Updated At',
idType.id as 'idTypeId',
vi.id as 'vechicleId',
vi.brand_id as 'Vechilebrand',
vi.model as 'VechileModel',
vi.vechile_no as 'VechileNo',
vi.color as 'Color'
from guest_table g
inner join id_type_table idType on g.id_type_id =idType.id
LEFT JOIN vechile_info_table vi on ( g.vehicle_id=vi.id OR ( g.vehicle_id IS NULL AND vi.id IS NULL))
order by g.created_at desc

END
```
Member 14921707 1-Nov-21 13:46pm View    
Deleted
my store procedure

```
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[sp_loadGuest]
-- Add the parameters for the stored procedure here
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

-- Insert statements for procedure here
select g.id as 'id',
g.name as 'Name',
g.host_by as 'Host By',
g.purpose_of_visit as 'Purpose Of Visit',
g.companyName as 'Company Name',
g.occupication as 'Occupication',
g.address as 'Address',
g.city as 'City',
g.country as 'Country',
g.contact_no as 'CountactNo' ,
g.email as 'Email',
g.profile_image as 'profile Image' ,
g.doc1_image as 'Doc1 Image',
g.doc2_image as 'Doc2 Image',
g.gender as 'Gender',
g.religion as 'Religion',
idType.card_type as 'Id Type',
g.id_no as 'Id No',
g.note as 'Note',
g.created_at as 'Created At',
g.updated_at as 'Updated At',
idType.id as 'idTypeId',
vi.id as 'vechicleId',
vi.brand_id as 'Vechilebrand',
vi.model as 'VechileModel',
vi.vechile_no as 'VechileNo',
vi.color as 'Color'
from guest_table g
inner join id_type_table idType on g.id_type_id =idType.id
LEFT JOIN vechile_info_table vi on ( g.vehicle_id=vi.id OR ( g.vehicle_id IS NULL AND vi.id IS NULL))
order by g.created_at desc

END
```
Member 14921707 31-Oct-21 13:10pm View    
it is just load guest..in my sql server it only take 0.01 sec