select * from pragma_optimize(1);

the table format of all pragmas is to prepend pragma_ to the pragma name.

select * from pragma_function_list;
select * from pragma_cache_size;

etc etc.

https://sqlite.org/pragma.html


---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.


>-----Original Message-----
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of Bart Smissaert
>Sent: Saturday, 26 August, 2017 16:38
>To: SQLite mailing list
>Subject: Re: [sqlite] Output of pragma optimize?
>
>> SELECT * FROM PRAGMA optimize(1);
>
>That doesn't prepare, error at (
>
>RBS
>
>On Sat, Aug 26, 2017 at 11:03 PM, Simon Slavin <slav...@bigfraud.org>
>wrote:
>
>>
>>
>> On 26 Aug 2017, at 10:58pm, Bart Smissaert
><bart.smissa...@gmail.com>
>> wrote:
>>
>> > I looked at my application code and that seems OK, but the output
>is a
>> > single null value.
>> > What kind of output should I get?
>>
>> That’s just SQLite returning SQLITE_OK because the command ran
>without
>> problems.
>>
>> You need to execute that PRAGMA command as if it’s a SELECT
>command.  It
>> should return a table.  If the tools you’re using do not allow
>this, turn
>> the PRAGMA into a SELECT command as follows:
>>
>> SELECT * FROM PRAGMA optimize(1);
>>
>> Simon.
>> _______________________________________________
>> sqlite-users mailing list
>> sqlite-users@mailinglists.sqlite.org
>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-
>users
>>
>_______________________________________________
>sqlite-users mailing list
>sqlite-users@mailinglists.sqlite.org
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to