Jump to content

SQLite help example slow


Recommended Posts

Thought I'd get my feet wet with SQLite. Ran this example from the help file. Only difference I made was to comment out the last MsgBox()

#include <SQLite.au3>
#include <SQLite.dll.au3>
Local $sSQliteDll
$sSQliteDll = _SQLite_Startup()
If @error Then
MsgBox(16, "SQLite Error", "SQLite3.dll Can't be Loaded!")
Exit -1
EndIf
;MsgBox(0, "SQLite3.dll Loaded", $sSQliteDll)
ConsoleWrite("_SQLite_LibVersion=" & _SQLite_LibVersion() & @CRLF)
_SQLite_Shutdown()

Here's the console output. Notice that it took a full 2 minutes to run. Isn't that unusually slow?

Can anyone point me to something I've probably missed? Thanks!

>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "D:\AutoIt\AutoIt scripts\scrap2.au3" /UserParams  
+>07:06:11 Starting AutoIt3Wrapper v.2.1.0.8    Environment(Language:0409  Keyboard:00000409  OS:WIN_XP/Service Pack 3  CPU:X64 OS:X86)
>Running AU3Check (1.54.22.0)  from:C:\Program Files\AutoIt3
+>07:06:11 AU3Check ended.rc:0
>Running:(3.3.8.0):C:\Program Files\AutoIt3\autoit3.exe "D:\AutoIt\AutoIt scripts\scrap2.au3"  
_SQLite_LibVersion=3.6.22
+>07:08:11 AutoIT3.exe ended.rc:0
>Exit code: 0   Time: 121.981
Link to comment
Share on other sites

  • Moderators

Hi, VelvetElvis. I copied your code and it completed in just over a second (see below). The only difference I see is your _SQLite_LibVersion is older.

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:UsersMeDesktopTest.au3" /UserParams   
+>08:22:27 Starting AutoIt3Wrapper v.2.1.0.8    Environment(Language:0409  Keyboard:00000409  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64)
>Running AU3Check (1.54.22.0)  from:C:Program Files (x86)AutoIt3
+>08:22:27 AU3Check ended.rc:0
>Running:(3.3.8.1):C:Program Files (x86)AutoIt3autoit3.exe "C:UsersMeDesktopTest.au3"   
_SQLite_LibVersion=3.7.2
+>08:22:27 AutoIT3.exe ended.rc:0
>Exit code: 0    Time: 1.039

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

What you've experience is a direct consequence of a recent change on how the SQLite DLL(s) is/are distributed.

In short, the code run above downloaded the latest available SQLite DLL from the AutoIt repository.

That should normally happen only once, since subsequent runs will find the DLL ready for use (on the same machine) and skip the download phase.

If ever you experience other issues or need guidance using SQLite, just post in this forum.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

Thanks JLogan3o13 for your reply.

jchd, not sure I understand. I've run this numerous times, with the same results. Are you implying the example would trigger the download?

I'm behind a draconian corporate firewall, and perhaps this is what's causing the grief. Could you please tell me exactly what files I need? I will try to find an alternate download source and see how that goes.

UPDATE:

Looks like I just needed the one .dll. Found it on the SQLite site.

Thanks all!!

Edited by VelvetElvis
Link to comment
Share on other sites

Nice choice. BTW if you're going to distribute your application widely and/or in a corporate context, the best thing to do is to bundle the dll with the app using FileInstall or equivalent.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...