• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: sqlite question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sqlite question


  • Subject: Re: sqlite question
  • From: Axel Luttgens <email@hidden>
  • Date: Sun, 19 Apr 2015 15:05:36 +0200

Le 19 avr. 2015 à 13:37, Jim Weisbin a écrit :
>
> […]
>
> But I’m not sure how I could speed this up:
>
> set theCommand to "sqlite3 " & path_to_db & " 'select file_name FROM player_view;' "
> set theResult to do shell script theCommand
> set theText to paragraphs of theResult
>
> — etc
>
> if newName is in theText then
> error newName & " already exists!"
> end if

Hello Jim,

You wrote the other day:

> […]
> connects to a server share and gets a list of file names from a sqlite DB, as follows:
> […]
> The script is already working, and fairly quick on a gigabit network, but the sqlite query is pretty slow when logged in remotely.
> […]

Could you provide us with a bit more context?

For example, what is the value of path_to_db (I guess it is a string beginning with « /Volumes/… »)?
What are the permissions on the file path_to_db and on the enclosing folder, as seen with a « ls -al path_to_db »?
What is the sharing protocol (AFP, SMB…)?
Could you provide rough timings for the SELECT performed on the remote database file and on a local copy of it?
Is the database file the only remotely accessed item?
What values are stored in column PLAYER_VIEW.FILE_NAME (file names, or file paths)?
Do you only need to read data from the database (no INSERTs, UPDATEs…)?
And so on ;-)

Axel




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden


References: 
 >Re: sqlite question (From: Jim Weisbin <email@hidden>)

  • Prev by Date: Re: Scriplting the Photos application
  • Next by Date: Re: Scriplting the Photos application
  • Previous by thread: Re: sqlite question
  • Next by thread: Re: sqlite question
  • Index(es):
    • Date
    • Thread