ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Roman Savochenko <rom_as@diyaorg.dp.ua>
To: community@altlinux.ru
Subject: Re: [Comm] Производительность SQLite!
Date: Tue, 30 Nov 2004 09:22:34 +0200
Message-ID: <41AC1FBA.3040701@diyaorg.dp.ua> (raw)
In-Reply-To: <41AB9232.5040602@users.sf.net>

Alexey Rusakov wrote:

> On 29.11.2004 20:13, Roman Savochenko wrote:
>
>> Всем привет!
>>
>> Начал я тут пользовать SQLite 3.0, привязал к своему проекту, 
>> запустил тест и получил странный результат.
>> А странность заключается в низкой скорости. Ниже приведено сравнение 
>> с другими БД:
>> //------------------------------------------------------------------------------------------------------------------------------------------------- 
>>
>> Производятся операции над 200 записями (строками). Таблица состоит из 
>> 5 колонок разных типов.                        
>> ------------------------------------------------------------------------------------------- 
>>
>> Операции                         | SQLite   | DBF(своя реализ) | MySQL |
>> -------------------------------------------------------------------------------------------- 
>>
>> Создание 200 строк:     | 2.66 сек |  0.05 сек                  | 
>> 0.19      |
>> Обновление 200 строк: | 2.73 сек |  0.06 сек                  | 
>> 0.18      |
>> Получение 200 строк:    | 0.09 сек |  0.06 сек                  | 
>> 0.12      |
>> Удаление 200 строк:      | 2.25 сек |  0.01 сек                  | 
>> 0.12      |
>> //------------------------------------------------------------------------------------------------------------------------------------------------- 
>>
>>
>> Может там чего настроить нужно?
>> А то, что-то, он далеко не быстрый.
>
> Какие индексы определены? Какие запросы выполнялись?

Адресация производится по ключевым полям, в случае с тестом это одно 
ключевое поле "name" типа TEXT.
Обращаюсь к БД с помощью функции sqlite3_get_table(); обёрта над этой 
функцией практически такая же как и для
MySQL.
SQL запросы такиеже как и для MySQL: CREATE, INSERT, UPDATE, SELECT, DROP.
В дополнении к вопросу производительности возникло ещё парочка:
- Как получить, просто, список колонок в таблице?
В MySQL это делается запросом типа <SELECT * FROM "tbl1" WHERE 0>
- Есть имена колонок на которые SQLite ругается. Например на запрос:
CREATE TABLE "test2" ("name" TEXT PRIMARY KEY, "num" DOUBLE, "TABLE" TEXT);
Ругается: <Request error: near "TABLE": syntax error>.
По мне, так это недопустимо!
Да и в MySQL такого безобразия нет.

С уважением Роман!


  reply	other threads:[~2004-11-30  7:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-29 17:13 Roman Savochenko
2004-11-29 21:18 ` Alexey Rusakov
2004-11-30  7:22   ` Roman Savochenko [this message]
2004-11-30 10:08     ` Evgeniy Kobzev
2004-11-30 16:08       ` Roman Savochenko
2004-11-30 16:46         ` Roman Savochenko
2004-12-01 10:05       ` Roman Savochenko
2004-12-01 10:30         ` Evgeniy Kobzev
2004-12-02 14:19 ` Денис Смирнов

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41AC1FBA.3040701@diyaorg.dp.ua \
    --to=rom_as@diyaorg.dp.ua \
    --cc=community@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git