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


> >
> >
> > 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.

HELLO AGAIN

YES I HAVE SEVERAL INDEXES ON THE ARTI TABLE
I SUPPRESSED DISTINCT AND ADDED WHERE arart > 0;
INSTEAD OF RUNNING 55 SECS IT RUN NOW 45 SECS
BUT WHEN I RUN THIS PART OF PROGRAM AS A SINGLE USER THE SAME PROCESS RUNS IN 6 SECS
IT ONLY BECOMES SLOW WHEN ANOTHER USER USES ARTI

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