Article View: pl.comp.bazy-danych
Article #195469Re index primary key
From: Jakub
Date: Sat, 06 Jan 2018 08:52
Date: Sat, 06 Jan 2018 08:52
13 lines
1106 bytes
1106 bytes
witam Mam tabelę z kolumną primary index auto increment. Tabela powyżej 1GB. Czasami muszę od czasu do czasu dokonać reindeksacji. znalazłem takie coś: SET @newid=0; UPDATE jpage SET ind=(@newid:=@newid+1) ORDER BY ind; Czy może znacie coś bardziej efektywnego? Pozdrawiam i z góry dziękuję za podpowiedzi Jakub
Technical Details
Message-ID:
<p2q2md$ear$1@news.icm.edu.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!.POSTED!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!.POSTED!not-for-mail From: Jakub <jak74@interia.pl> Newsgroups: pl.comp.bazy-danych Subject: Re index primary key Date: Sat, 6 Jan 2018 09:52:14 +0100 Organization: ICM, Uniwersytet Warszawski Lines: 13 Message-ID: <p2q2md$ear$1@news.icm.edu.pl> NNTP-Posting-Host: public-gprs400276.centertel.pl Mime-Version: 1.0 X-Trace: news.icm.edu.pl 1515228685 14683 37.47.194.213 (6 Jan 2018 08:51:25 GMT) X-Complaints-To: usenet@news.icm.edu.pl NNTP-Posting-Date: Sat, 6 Jan 2018 08:51:25 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 X-Mozilla-News-Host: news://news.tpi.pl:119 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit