Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Borislav Borissov
  Where is Borislav Borissov?
 Sofia
 Bulgaria
 Borislav Borissov
 To: Dany Beelen
  Where is Dany Beelen?
 HERK-DE-STAD
 Belgium
 Dany Beelen
 Tags
Subject: RE: SQL SLOW WITH 2 USERS
Thread ID: 228382 Message ID: 228427 # Views: 2 # Ratings: 0
Version: Visual FoxPro 8 Category: General VFP Topics
Date: Monday, May 18, 2009 8:39:12 PM         
   


> >
> > 5 secs to open a form?
> > With table with only 30000 recs?
> > What you use to get and set the data?
> > What is your SQL Select?
> > Did you begin a transaction w/o closing it?
> > What SQL Profiler said about that?
> >
> > -----------------
> > Borislav Borissov
> >
> > Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
> > The only thing normal about database guys is their tables.
>
>
> It is a formset
> the statement is like this
> SELECT DISTINCT arart, argenr, ardesc, arverk1 FROM arti INTO CURSOR sqlArtiupd1Arti NOCONSOLE ORDER BY arart
> I run this statement on a combobox
> When I reduce the table to 10000 records everything opens for the 2 users in about 5 secs


Sorry, I thought you use SQL Server not pure VFP SQL.
So I have another question:
Did you have ANY index on that table "arti"?
If you have you could speed it up if you use Rushmore optimization.
I will assume (just for the example) that you have an index based on arart and arart is numeric wich can't be smaller than 1.
Then you could use this:
SELECT DISTINCT arart, argenr, ardesc, arverk1;
       FROM arti;
WHERE arart > 0;
ORDER BY arart;
INTO CURSOR sqlArtiupd1Arti ;
NOCONSOLE


By the way are you REALLY need DISTINCT clause? This clause also slows down the query execution.

-----------------
Borislav Borissov

Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.

ENTIRE THREAD

SQL SLOW WITH 2 USERS Posted by Dany Beelen @ 5/18/2009 5:31:56 PM
RE: SQL SLOW WITH 2 USERS Posted by Borislav Borissov @ 5/18/2009 5:53:56 PM
RE: SQL SLOW WITH 2 USERS Posted by Dany Beelen @ 5/18/2009 7:35:22 PM
RE: SQL SLOW WITH 2 USERS Posted by Borislav Borissov @ 5/18/2009 8:39:12 PM
RE: SQL SLOW WITH 2 USERS Posted by Dany Beelen @ 5/19/2009 3:43:17 PM
RE: SQL SLOW WITH 2 USERS Posted by Borislav Borissov @ 5/19/2009 3:51:16 PM
RE: SQL SLOW WITH 2 USERS Posted by Dany Beelen @ 5/19/2009 4:06:57 PM
RE: SQL SLOW WITH 2 USERS Posted by Borislav Borissov @ 5/19/2009 5:43:18 PM
RE: SQL SLOW WITH 2 USERS Posted by Dany Beelen @ 5/19/2009 6:09:13 PM
RE: SQL SLOW WITH 2 USERS Posted by Dany Beelen @ 5/19/2009 6:26:11 PM
RE: SQL SLOW WITH 2 USERS Posted by Dany Beelen @ 5/19/2009 6:43:42 PM
RE: SQL SLOW WITH 2 USERS Posted by Borislav Borissov @ 5/19/2009 6:56:45 PM
RE: SQL SLOW WITH 2 USERS Posted by Dany Beelen @ 5/20/2009 12:16:17 PM
RE: SQL SLOW WITH 2 USERS Posted by Dany Beelen @ 6/12/2009 5:11:52 PM