http://www.sqlite.org/limits.html

"2.Maximum Number Of Columns

The SQLITE_MAX_COLUMN compile-time parameter is used to set an upper bound on:

◦The number of columns in a table
◦The number of columns in an index
◦The number of columns in a view
◦The number of terms in the SET clause of an UPDATE statement
◦The number of columns in the result set of a SELECT statement
◦The number of terms in a GROUP BY or ORDER BY clause
◦The number of values in an INSERT statement

The default setting for SQLITE_MAX_COLUMN is 2000. You can change it
at compile time to values as large as 32767. On the other hand, many
experienced database designers will argue that a well-normalized
database will never need more than 100 columns in a table.

In most applications, the number of columns is small - a few dozen.
There are places in the SQLite code generator that use algorithms that
are O(N²) where N is the number of columns. So if you redefine
SQLITE_MAX_COLUMN to be a really huge number and you generate SQL that
uses a large number of columns, you may find that sqlite3_prepare_v2()
runs slowly.

The maximum number of columns can be lowered at run-time using the
sqlite3_limit(db,SQLITE_LIMIT_COLUMN,size) interface."

On 11/14/11, vinayh4 <vinay...@gmail.com> wrote:
>
> Hi All
>
> I need to create table with more than 2000 columns, How to reset
> SQLITE_MAX_COLUMN value which
> is  2000 . Plz help me on this issue.
>
> Thanks
> Vinay
>
>
> Vannus wrote:
>>
>> That should do the trick, thanks for pointing it out.
>>
>> On 10 February 2011 06:18, Dan Kennedy <danielk1...@gmail.com> wrote:
>>
>>> On 02/10/2011 01:56 AM, Vannus wrote:
>>> > Zeoslib is reading sqlite field lengths incorrectly, as it checks for
>>> > brackets after the field typename ie. CHAR(123)
>>> > presumably this is only affecting me because I haven't defined field
>>> lengths
>>> > in my sqlite3 db.
>>> >
>>> > I don't want to hard-code 1,000,000,000 or 2147483647 in as the field
>>> length
>>> > - but how do I check what SQLITE_MAX_LENGTH or the limit imposed by
>>> > sql_limit or sqlite3_limit is?
>>>
>>> At http://www.sqlite.org/c3ref/limit.html the third paragraph
>>> has:
>>>
>>>   Regardless of whether or not the limit was changed, the
>>>   sqlite3_limit() interface returns the prior value of the limit.
>>>   Hence, to find the current value of a limit without changing it,
>>>   simply invoke this interface with the third parameter set to -1.
>>>
>>> Maybe you can use that.
>>>
>>> Dan.
>>> _______________________________________________
>>> sqlite-users mailing list
>>> sqlite-users@sqlite.org
>>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>
>> _______________________________________________
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>>
>
> --
> View this message in context:
> http://old.nabble.com/determine-SQLITE_MAX_LENGTH-or-sql_limit-sqlite3_limit-tp30885748p32838625.html
> Sent from the SQLite mailing list archive at Nabble.com.
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>


-- 
--
   --
      --
         --ô¿ô--
        K e V i N
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to